pycharm 出现could not find or load the Qt platform plugin "windows"
运行pycharm(python 3.6)的时候出现以下问题,同时显示“python已停止运行”。
在网上找了很久的解决方法,有人说是网络的问题(pycharm网络被禁),也有说是Qt安装有问题,通过几番尝试,最后通过如下方式解决了问题:
1)设置working directory,File ->Settings-> Build, Execution, Deployment ->Console ->Python Console -> Working directory. 将其目录设为当前代码所在的目录;
2)设置环境变量,右键 计算机->属性->高级系统设置->环境变量->系统变量->新建->变量名为 QT_PLUGIN_PATH ->变量值为 D:\software\Python\Anaconda\install\Library\plugins;
3)重启pycharm。