代码改变世界

windows10下 重新安装python 原道报错信息:this application failed to start because no qt platform plugin could be init

2019-11-15 10:01  选择呢  阅读(4866)  评论(1编辑  收藏  举报

PyQt5+python做UI时,使用pyinstaller打包成exe,点击运行exe文件时,出现This application failed to start because it could not find or load the Qt platform plugin "windows错误。

 

问题是,缺少必要的dll文件,我们找到路径:C:\ANACONDA\Lib\site-packages\PyQt5\Qt\plugins(这是我的安装路径),在此文件夹下找到platforms文件夹,然后拷贝整个文件夹,将其放到与exe相同的路径下,这时候就可以运行exe了。