Importing Python Modules to DobotStudio Script Editor


#1

How do you import downloaded (with pip) python modules into the DobotStudio script editor?

So far I have done the following:

  1. Downloaded the pyaudio.py module using pip
  2. Tried to run “import pyaudio” in the script editor
  3. Verified that the import works outside of DobotStudio and that other “out of the box” modules such as math and os work fine
  4. Tried to check the location of the modules by using the print(some_module.file) command but it brings me to a Temp directory where the module is compiled.

I’m pretty sure that if I can track down the directory from which DobotStudio retrieves the modules I’ll be able to simply copy and paste pyaudio to that location but so far I’ve had no luck.

Thanks!


#2

I figured out a solution that will work for now.
First, I had to get the 32-bit version of python and get that version of pyaudio.
Then, I had to move the files associated with the module to the Temp directory where DobotStudio pulls its modules from. (I found this with the script:
import os
print(os.file)

This seems like more of a patch to me, so if anyone knows a better way to get new modules in the script editor let me know!


#3

I know this thread is a bit old but I´ve contacted Dobot asking how to import a library into DobotStudio and they don´t seem to know or want to answer.