pyinstaller打包的程序启动报错:
Traceback (most recent call last):
File "site-packages\pyinstaller-3.3.dev0-py3.5.egg\PyInstaller\loader\rthooks\pyi_rth_qt5plugins.py", line 46, in <module>
File "C:\Users\kang\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.3.dev0-py3.5.egg\PyInstaller\loader\pyimod03_importers.py", line 573, in load_module
module = loader.load_module(fullname)
ImportError: DLL load failed: The specified module could not be found.
Failed to execute script pyi_rth_qt5plugins
由于加载dll路径依赖有问题
解决方法:
# 打包时增加 path 参数 指定qt dll目录
pyinstaller --path C:\Python35-32\Lib\site-packages\PyQt5\Qt\bin test.py
网友评论
windows10
python3.5.4
PyQt5.9