Import Python libraries in RoboDK可打印版本 +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Import Python libraries in RoboDK (/Thread-Import-Python-libraries-in-RoboDK) |
Import Python libraries in RoboDK-lschantz-04-20-2022 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! RE: Import Python libraries in RoboDK-Alex-04-20-2022 如果哟u only have one python installation (installed with RoboDK) in your computer it is as simple as writing:
Code:
import pyrealsense2, opencv, detecto, tensorflow , numpy, and matplotlib
如果哟u have more than one installation you can temporarily add the libraries it to your path with something like this
Code:
import sys
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 |