DoooReyn / WxReader

基于PySide6的微信读书自动阅读器

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This application failed to start because no Qt platform plugin could be initialized.

jmc-123 opened this issue · comments

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may this problem 、 Available platform plugins are : direct2d minimal, offscreen, windows.

在windows server 2012r2 上运行打包后的程序,出现如上错误,项目提及的PySide6~=6.4.0 cefpython3~=66.1 pyinstaller~=5.5 已正确安装,请问哪里还没配置正确,网上也搜试了不少方案,谢谢。

commented

no qt plugin 一般是找不到 plugin 目录,你可以在 sys.path 中添加看看。

再不行可以试试网上的办法:

方法一:让设置plugins的环境变量。

方法二:使用Qt部署工具windeployqt.exe(在qt安装目录中)来检测运行该exe所需动态库,运行命令:
windeployqt.exe 目标.exe

运行完成后,目标.exe同级目录中就会出现其依赖库了,相关的plugins和platform文件夹与动态库都会拷贝在该目录下。此时再次运行试试。