【已解决】qt.qpa.plugin: Could not load the Qt platform plugin “windows“ in ““ even though it was found.

在加载labelimg的时候出现报错:

qt.qpa.plugin: Could not load the Qt platform plugin “windows” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

在这里插入图片描述
翻译:Qt .qpa.plugin:无法在“”中加载Qt平台插件“windows”,即使它被找到。这个应用程序启动失败,因为没有Qt平台插件可以初始化。重新安装应用程序可以解决此问题。

解决方法:

  1. 卸载重装labelimg,但还是出现同样的报错
  2. 因此考虑到可能是QT的路径问题
    解决:在环境变量-系统变量里添加以下内容:
    变量名:QT_PLUGIN_PATH
    变量值:Qt5中plugins文件夹的位置
    在这里插入图片描述
    重启anaconda后还是没法解决
  3. 完全移除之前安装的PyQt5,然后重装PyQt5
pip uninstall pyqt5
pip uninstall pyqt5-tools
pip uninstall pyqt5-qt5
pip uninstall pyqt5-sip

使用conda list查看是否还有PyQt5的库,如果没有的话则表明已清除干净。接下来就是重装PyQt5了

pip install PyQt5 -i https://pypi.douban.com/simple

安装成功后,输入labelimg,就可以弹出软件了。
问题解决。

猜你喜欢

转载自blog.csdn.net/weixin_46599926/article/details/132576385