Pyinstaller打包PyQt5项目提示缺少插件问题
# 日常笔记
报错内容如下:
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: minimal, offscreen, webgl, windows.
网上的各种方法我都用了,包括指定qt插件路径、复制插件到当前目录什么的,通通没用。
经过排查发现,打包后的文件包含了pyside2这个库,但是我的代码压根没有导入这个库,直接删之。
再次运行主程序,发现正常。
大家先: pip uninstall pyside2
然后在: pyinstaller 打包