PyQt5 - 无法加载平台插件“windows".可用平台有:windows、minimal [英] PyQt5 - Failed to load platform plugin "windows". Available platforms are: windows, minimal

查看:69
本文介绍了PyQt5 - 无法加载平台插件“windows".可用平台有:windows、minimal的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试从 Eclipse 运行任何 PyQt5 程序时,出现此错误.

When I try to run any PyQt5 program from Eclipse, I got this error.

无法加载平台插件windows".可用平台有:windows、minimal

Failed to load platform plugin "windows". Available platforms are: windows, minimal

我在 PyQt4 上从来没有遇到过这个问题,但是在新版本中.

I've never encountered this problem with PyQt4 but with the new version.

我无法运行程序.从这里的其他问题我知道它发生在 Qt C++ 开发中,解决方案是将一些 Qt dll 文件复制到可执行程序目录.

I'm not able to run a program. From other questions here I know it happens with Qt C++ development and the solution is to copy some Qt dll files to executable program directory.

我是否也需要在 Python 开发 (PyQt5) 中做同样的事情?将这些文件添加到我的 *.py 文件所在的目录中?这不应该由 PyQt5 安装管理吗?

Do I need to do the same in Python development (PyQt5) too? Add those files to the directory, where my *.py files reside? Shouldn't this be managed by PyQt5 installation?

谢谢

推荐答案

我在 PyQt5 5.0.2、Windows 8、Python 3.3.2 上遇到了这个问题;错误信息略有不同:

I encountered this issue with PyQt5 5.0.2, Windows 8, Python 3.3.2; slightly different error message:

无法加载平台插件windows".可用平台有:

设置以下环境变量,然后运行应用程序.

Set the following environment variable and then run the application.

$env:QT_QPA_PLATFORM_PLUGIN_PATH="C:\Python33\Lib\site-packages\PyQt5\plugins\platforms"

这篇关于PyQt5 - 无法加载平台插件“windows".可用平台有:windows、minimal的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆