PyQt5 &PySide2/无法加载 Qt 平台插件“windows"在“"即使它被发现 [英] PyQt5 & PySide2 / Could not load the Qt platform plugin "windows" in "" even though it was found
问题描述
开发环境
1. Windows 10 / Python 3.6.8 / Pyinstaller 3.4 / PyQt5 5.10
2. Windows 10 / Python 3.6.8 / Pyinstaller 3.4 / PySide2 5.11.0
3. Windows 10 / Python 3.6.8 / Pyinstaller 3.4 / PyQt5 5.9.2
执行环境
Windows Server 2008 SP2
在情况 1、2 中:发生以下错误.
In case 1, 2 : Below Error Occurred.
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.
Available platform plugins are: minimal, offscreen, webgl, windows.
但是情况 3:没有错误.
But case 3 : No Error.
Qt 5.10以上版本测试结果与案例1、2相同.
The results of testing the higher versions than Qt 5.10 are the same as case 1, 2.
我必须使用 PySide2.但 PySide2 没有低于 Qt 5.9.2 的版本.
I must use PySide2. but PySide2 does not have a lower version than Qt 5.9.2.
有没有办法避免使用 PySide2 的错误?
Is there a way to avoid the error using PySide2 ?
推荐答案
使用 Anaconda:
With Anaconda:
conda install -c conda-forge pyside2
但是是旧版本.(v5.6)使用旧版本,到目前为止我没有遇到任何问题.我对新版本有同样的问题,但我需要它,因为旧版本不支持 QtCharts
But is an older version. (v5.6) With the older version, I did not encounter any problems so far. I have the same problem with the new version but I need it because the older does not have support for QtCharts
这篇关于PyQt5 &PySide2/无法加载 Qt 平台插件“windows"在“"即使它被发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!