PySide2或PyQt5 运行时提示This application failed to start because no Qt platform plugin could be initialized的解决办法

发布时间 2023-04-07 17:43:18作者: 尼古拉-卡什
1.

把 PySide2 或者 PyQt5 安装在解释器目录下的 \plugins\platforms 目录添加到环境变量Path中。

比如,我的环境就是把下面这个路径加到 环境变量 Path 中 c:\Python38\Lib\site-packages\PySide2\plugins\platforms

 

2. 

确保环境变量中没有中文