exe找不到使用pyinstaller和pyq的dll

2024-04-19 20:21:07 发布

您现在位置:Python中文网/ 问答频道 /正文

当我在程序上使用pyinstaller --windowed main.py时,当我运行结果可执行文件main.exe时,出现以下错误:

This application failed to start because it could not find or load the Qt platform plugin "windows" in "".

Reinstalling the application may fix the problem.

文件夹结构如下所示:

main
├── PyQt5
|   └── Qt
|       └── plugins
|           ├── iconengines
|           ├── imageformats
|           ├── platforms
|           └── printsupport
├── main.exe
└── ...

当我将其更改为:

^{pr2}$

我怀疑程序找DLL的深度不够。 但是我想运行pyinstaller --windowed --onefile main.py。 当然,当我这样做时,我不能改变文件夹结构。在

如何使用--onefile标志运行程序?在


Tags: thepy程序文件夹可执行文件applicationmain错误