规格:
不幸的是,该应用程序需要在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添加到我的环境路径中。
问题仍然存在
任何想法?
规格:Python版本:3.4.3操作系统:带有Windows Xp版本2002 Service Pack 3的虚拟盒PyQt4:GPL_win-4.12.3不幸的是,该应用程序需要在XP上运行,并且我需要使用特定版本的Windows XP。
[原来我使用的二进制安装程序用于PyQT5。我用PyQt4 .dlls找到了正确的二进制安装程序,现在一切正常。