pyinstaller打包前可以正常运行,打包后ImportError: DLL load failed while importing QtWebEngineWidgets: 找不到指定的程序。
环境
- IDE:PyCharm 2022.2.2 (Community Edition)
- Python 版本:3.9
- pyinstaller 版本:5.7
- pyqt5 版本:5.15.7
使用的打包命令为
pyinstaller -w -D main.py
报错
- pyinstaller打包前正常运行,打包后出现ImportError: DLL load failed while importing QtWebEngineWidgets: 找不到指定的程序。
- 信心满满开始百度,以为是小bug,分分钟解决,没想到,搞了我1天多时间。
尝试一下方法均不能解决
- 打包
-p
加包路径,pyinstaller -w -D -p 包路径 main.py
,