PySide6 This application failed to start because no Qt platform plugin could be initialized. 解决办法

↵问题描述:

qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "D:\professional_software\Anocon
da\Anaconda\Lib\site-packages\PySide6\plugins"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling 
the application may fix this problem.

解决办法:

添加环境变量。

变量名:QT_QPA_PLATFORM_PLUGIN_PATH

变量值就是~\Lib\site-packages\PySide6\plugins\platforms(注意这里要包含platforms,我看到有的的解决方案就是到plugins,我试了不管用,试了许多,终于可以了。)

PySide6 This application failed to start because no Qt platform plugin could be initialized. 解决办法_第1张图片

你可能感兴趣的:(qt,开发语言,windows)