PyQt5:This application failed to start because it could not find or load the Qt platform plugin
问题描述
安装完 PyQt5、pyqt5-tools 后,点击 designer.exe
报错:This application failed to start because it could not find or load the Qt platform plugin"
解决方案
首先我们现在处于 pyqt5_tools > Qt > bin
目录下,点击这里的 designer.exe
会报错呢。
那我们返回这个目录的上一级目录,也就是 pyqt5_tool > Qt
,然后进入这个目录下的 plugins
看到这个 platforms
了吗,复制这个文件夹
回到 pyqt5_tools > Qt > plugins
目录,用刚刚复制的 platforms
覆盖这里的 platforms
即可。
好,现在以及可以正常运行 designer.exe
了。