Python | PyQt5 Could not find the Qt platform plugin windows错误解决方法

在写Python大作业的时候发现运行PyQt5时有报错

出现该问题的原因是环境变量没有添加。

解决方法:
在环境变量中增加:

QT_QPA_PLATFORM_PLUGIN_PATH

样例路径(这里填你的PyQt的plugins文件夹位置:

C:Program FilesPython38Libsite-packagesPyQt5Qtplugins

原文地址:https://www.cnblogs.com/RioTian/p/14234553.html