0

I am trying to launch a script from blender 2.82 which uses PyQt5. PyQt5 module is installed and when running python3 from terminal and import PyQt5.QtCore, it works fine.

When i try to import from my blender script, it fails. I have tried to add in the script

import sys
sys.path.append("/usr/lib/python3/dist-packages")

which is the path where my python packages are installed, but still fails to import the module

What am I doing wrong?

jjcasmar
  • 359
  • 1
  • 4
  • 15
  • Maybe It is in site-packages? – D. Skarn May 08 '20 at 15:10
  • no, its actually dist-packages – jjcasmar May 08 '20 at 15:23
  • Since Blender uses it's own interpreter and packages, I would suggest to install the package for Blender. See this answer for a way to do this from a Python script within Blender. You could also use your system's interpreter and modules, which would be another approach. However this would require compatible Python versions. – Robert Gützkow May 10 '20 at 13:02
  • How can I use the system interpreter and modules? Isnt it possible to use blender interpreter adding system modules to the path? – jjcasmar May 10 '20 at 22:02

0 Answers0