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

错误提示

在打开PyQt5-tools中的Designer.exe时,提示如下错误:

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

designer

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

解决方法

定位到Python38\Lib\site-packages\PyQt5\Qt\plugins,这个位置取决于你安装Python的位置,我的电脑上该位置的完整路劲是:C:\Users\focksor\AppData\Local\Programs\Python\Python38\Lib\site-packages\PyQt5\Qt\plugins

将该目录下的platforms文件夹复制到Python38\Lib\site-packages\pyqt5_tools\Qt\bin,并替换处于该目录下的platforms内的文件。

再次打开designer.exe,此时问题应该已解决。

参考

PyQt5 Designer is not working: This application failed to start because no Qt platform plugin could be initialized

提示

如果你同样遇到该问题并通过此贴解决了问题,你可以留下你的评论来提示后来人该方法是可行的。

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

上一篇:Android中的进程与线程


下一篇:Web应用多账号系统设计及微信扫码登录实现