Reputation: 71
I've installed python 3.5.0
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)] on win32
Then installed Qt5 : pip install python-qt5.
Here code :
import sys
from PyQt5 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
button = QtWidgets.QPushButton("Hello")
button.setFixedSize(400, 400)
button.show()
app.exec_()
It return error:
C:\Python35\python.exe C:/py_test/test_qt5/main.py
Traceback (most recent call last):
File "C:/py_test/test_qt5/main.py", line 2, in <module>
from PyQt5 import QtWidgets
ImportError: DLL load failed: The specified module could not be found.
Here is my PATH:
C:\Python35\Scripts\;C:\Python35\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Skype\Phone\;C:\Python35\Lib\site-packages\PyQt5\;
Please adwise. Thanks
UPDATE: I have Qt5Widgets.dll and QtWidgets.pyd in C:\Python35\Lib\site-packages\PyQt5
Upvotes: 0
Views: 2575
Reputation: 71
So, PyQt5 will not work with python3.5
downgrading to python 3.4 solved problem
Upvotes: 0
Reputation: 7170
Do you have the binaries in C:\Python35\Lib\site-packages\PyQt5\
or are them in C:\Python35\Lib\site-packages\PyQt5\bin
?
Check if C:\Python35\Lib\site-packages\PyQt5\bin
exists and add the path to your environment PATH
variable.
Upvotes: 0