How to fix “could not find or load the Qt platform plugin windows” while using Matplotlib in PyCharm

前端 未结 21 1135
迷失自我
迷失自我 2020-12-02 13:00

I am getting the error \"could not find or load the Qt platform plugin windows\" while using matplotlib in PyCharm.

How can I solve this?

21条回答
  •  心在旅途
    2020-12-02 13:56

    If the Pycharm console or debugger are showing "Could not find or load the Qt platform plugin windows", the Python EXE file may be located at a different location for the PyCharm interpreter. You might manually select it in File -> Settings -> Interpreter.

    1. Set the working directory: File -> Settings -> Build, Execution, Deployment -> Console -> Python Console -> Working directory. Set it to the parent directory where your all code exists.

    2. Open Control Panel -> System Settings -> Advanced System Settings -> Environment Variables -> New. Set the variable name QT_PLUGIN_PATH , Variable Directory: Users\\Appdata\Local\Continuum\Anaconda2\Library\plugins.

    3. Restart Pycharm.

提交回复
热议问题