Traceback (most recent call last):
File "E:/!Study/PythonCode/Pyqt5Demo/Demo.py", line 2, in <module>
from PyQt5 import QtWidgets
ImportError: DLL load failed: 找不到指定的程序。
搜索了好几种方法都不行,只能自己研究下。
直接上解决方案:
拷贝
D:\Python37\Lib\site-packages\PyQt5\Qt\bin
所有文件到
D:\Python37\Lib\site-packages\PyQt5
就可以运行了,无需重启。
普通的程序只需要拷贝下面3个程序就可以了
Qt5Core.dll
Qt5Gui.dll
Qt5Widgets.dll