I want to create interface with blender and PyQt(or tkinter) and i don’t know how can i import PyQt Library in blender.
Can you help me please?
You have to append the path from you Python site-packages installation or copy the files into the site-packages folder of the Blender installation and then you can use it.
import sys sys.path.append('your_python_install/lib/site-packages') from PyQt5 import QtGui, QtCore
But when i run:
from PyQt4 import QtCore, QtGui
i receive this error:
Traceback (most recent call last):
File “<blender_console>”, line 1, in <module>
ImportError: DLL load failed: %1 n’est pas une application Win32 valide.
What can i do to resolve this error please?
Which version of Python are you using? It should be the same as the Python that Blender runs. 3.5.1 right now.
>>> import sys
‘3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)]’
This is working for me with Blender 2.78a.
thank you very much, it was just the compatibility of python versions