Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Import Python libraries in RoboDK

Hi, I am trying to import the following libraries in a Python script in RoboDK but am unsure how to do so: pyrealsense2, opencv, detecto, tensorflow, numpy, and matplotlib. All of the libraries are installed on my computer. Any guidance would be greatly appreciated!
If you only have one python installation (installed with RoboDK) in your computer it is as simple as writing:
import pyrealsense2, opencv, detecto, tensorflow , numpy, and matplotlib

If you have more than one installation you can temporarily add the libraries it to your path with something like this
import sys
sys.path.append(module_path) #you need to know where your module is located.

However, it might be easier to change the RoboDK python interpreter  by going to Tools ➜ Options and in the Python tab changing the option of Python interpreter to your prefered python path. 
You can install the Robodk API by runnning pip install robodk in a terminal

Users browsing this thread:
1 Guest(s)