close

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

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to fix “could not find or load the Qt platform plugin windows” while using Matplotlib in PyCharm in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

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

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

    I had the same problem with Anaconda3 4.2.0 and 4.3.0.1 (64-bit). When I tried to run a simple program that uses matplotlib

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

    I had the same problem with Anaconda3 4.2.0 and 4.3.0.1 (64-bit). When I tried to run a simple program that uses matplotlib

Method 1

I had the same problem with Anaconda3 4.2.0 and 4.3.0.1 (64-bit). When I tried to run a simple program that uses matplotlib, I got this error message:

This application failed to start because it could not find or load the Qt platform plugin "windows"

Reinstalling the application may fix this problem.

Reinstalling didn’t fix it.

What helped was this Look for the Anaconda directory and set the Library\plugins subdir (here c:\ProgramData\Anaconda3\Library\plugins) as environment variable QT_PLUGIN_PATH under Control Panel / System / Advanced System Settings / Environment Variables.

After setting the variable you might need to restart PyCharm, if the change does not have an immediate effect.


Even though after that the command line Python worked, TexWorks (which uses Qt as well) displayed an error message very much like it. Setting the QT_PLUGIN_PATH to the directory containing TexWorks’ Qt DLLs (here C:\Users\chris\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64) fixed the problem for both programs.

Method 2

If you are running PyQt5 and PySide2, this solved the problem for me:

Copy the following files:

\Anaconda3\Lib\site-packages\PySide2\plugins\platforms\qminimal.dll
\Anaconda3\Lib\site-packages\PySide2\plugins\platforms\qoffscreen.dll
\Anaconda3\Lib\site-packages\PySide2\plugins\platforms\qwindows.dll

to:

\Anaconda3\Library\plugins\platforms\

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read