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?
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?
You may need to copy the "plugins" file in on "Anaconda3\Library"(for example in my computer is "S:\Anaconda3\Library\plugins") to the same path of your .exe file.
I had a similar problem with PyCharm where things worked great in main run but not in debugger, getting the same error message. This happened for me because I had moved my Anaconda installation to a different directory. The debugger goes and checks a qt.conf file that is located at the same place as python. This location can be found by running
import sys; print sys.executable
. I found this solution through a pile of web searches and it was buried deep here. The qt.conf file needs to have correct paths for debugger to work.My qt.conf files looks like this in notepad:
Pycharm Console or Debugger showing this issue - Could not find or load the Qt platform plugin windows
Reason - Python exe file may be located at a different location for Pycharm interpreter, you might manually select it in file,settings,interpreter.
Solution -
Set the working directory. File ->Settings-> Build, Execution, Deployment ->Console ->Python Console -> Working directory. Set it to parent directory where your all codes are present.
Open Control Panel-> System Settings -> Advanced System Settings ->Environment Variables ->New. Set Variable Name: QT_PLUGIN_PATH , Variable Directory:Users\\Appdata\Local\Continuum\Anaconda2\Library\plugins
Restart Pycharm.
I copy the folder \Anaconda3\Library\plugins\platforms to \$\ where $ represents your project interpreter folder (Ex:"\project\anaconda_env\Scripts\") , because PyCharm calls the python.exe in this folder, not the one in \Anaconda3. and solve my problem.
In my case, I had multiple combined problems in order to make PyQt5 run on Windows, see DLL load failed when importing PyQt5