规格:
不幸的是,该应用程序需要在XP上运行,我需要使用特定版本的PyQT4和python。
我使用以下命令构建可执行文件:
pyinstaller --onefile app.py
当我尝试运行它时,得到以下信息:
The application failed too start because it could not find or load the Qt platform plugin 'windows'.
有多个帖子都发布了相同的问题,他们都建议在可执行文件旁边添加.dll,如下所示:
app.exe
Qt5Core.dll
Qt5Gui.dll
Qt5Widgets.dll
/platforms/
- qwindows.dll
- qminimal.dll
这些.dll来自 Python \ Lib \ site-packages \ PyQt4 \ plugins 和 Python \ Lib \ site-packages \ PyQt4 \ plugins \ platforms 文件夹。
我还尝试将Python \ Lib \ site-packages \ PyQt4 \ plugins \ platforms添加到我的环境路径中。
问题仍然存在
有什么想法吗?