该应用程序也无法启动,因为它无法找到或加载Qt平台插件“ windows”

时间:2019-12-21 20:47:55

标签: python pyqt pyqt4 exe pyinstaller

规格:

  • Python版本:3.4.3
  • Os:带有Windows Xp 2002 Service Pack 3的虚拟盒子
  • PyQt4:GPL_win-4.12.3

不幸的是,该应用程序需要在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添加到我的环境路径中。

问题仍然存在

有什么想法吗?

0 个答案:

没有答案