Techniques Sections
Get PySide2 or PyQt5 for Blender
UPDATE: 2020/06.23
- install PySide2 for Blender 2.83
- go to Blender install folder, D:\YourPathToThat\blender-2.83.0-windows64\2.83\python\bin
- copy the path, and go commandline (type D: enter if your blender in D drive, C drive no need):
cd D:\YourPathToThat\blender-2.83.0-windows64\2.83\python\bin D: .\python.exe -m pip install PySide2
- for Mac and Linux, same, just cd to that directory, and do above. the drive letter thing is just for windows, if you prefer to put app in other drive
Old Info, outdated
- For Blender 2.7.8a win64, 2.7.9b win64 case
- install or get python 3.5.1 x64 (which is same version as Blender above)
- install PyQt5-Py3.5-Qt5.7-x64 for that python 3.5.1, from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4
- once it is done, you can copy these folder/file from standalone python to blender python site package folder
- from Python35x64_DIR\Lib\site-packages to blender_DIR\2.79\python\lib\site-packages
- folder and file list:
- sip.pyd
- PyQt5
- sip-4.18.1.dist-info
- PyQt5-5.7.dist-info
- restart blender, you should be able to call “from PyQt5 import QtWidgets,QtCore,QtGui” without issue
Old Info, outdated Note:
- I use the pip method for blender's python, seem it install pip, pyside2, pyqt5 all fine, but when import, it always error “DLL can't load”
- I did
- get get-pip.py from https://pip.pypa.io/en/stable/installing/
- cd to blender-2.79b-windows64\2.79\python\bin
- paste get-pip.py there and run .\python.exe get-pip.py
- it installs fine, then .\python.exe -m pip install PySide2
- or pyqt5, it all install fine, but at the end, whenever import QtCore like that, it will error DLL load error
- at least the above copy paste from matching standalone python will work fine.
Pipeline
- my note:
- my setup for my universal_tool_template.py: https://github.com/shiningdesign/universal_tool_template.py
- Blender 2.7.8a win64
- python 3.5.1 x64 with PyQt5-Py3.5-Qt5.7-x64
- basically, you need install same version of standalone python that as your Blender built-in python version, then install the PyQt5 library matching the python version, and add the path to the library in Blender python or copy to blender_DIR\2.79\python\lib\site-packages
- sip.pyd
- PyQt5
- sip-4.18.1.dist-info
- PyQt5-5.7.dist-info
- full list of Python custom module build list: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4
- ref: