笔者在将基于pyqt5库开发的界面打包为exe程序后,双击exe文件控制终端报错:
qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "%QTDIR%\plugins\platforms\" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: direct2d, minimal, offscreen, windows, webgl.
**原因:**平台找不到插件,其实就是没找到qwindows.dll这个库文件
**解决办法:**手动把 qwindows.dll 复制到exe旁边,就可以运行了,此时插件就在当前目录。