Qt Platform Plugin Windows Error

Active14 days ago
  1. Qt Platform Plugin Windows Error 1
  2. Qt Platform Plugin Windows Error
  3. Reinstall Qt Platform Plugin Windows
  4. Qt Platform Plugin Windows Download
  • Error: 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 the application may fix this problem.
  • How to Install Qt SDK on Microsoft Windows. The Qt Software Development Kit (SDK) is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI).

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?

agold
4,8187 gold badges29 silver badges49 bronze badges

This application failed to start because it could not find or load the Qt platform plugin 'windows'. Available platform plugins are: minimal, offscreen, windows. Reinstalling the application may fix this problem. OK - I tried to put qwindows.dll from Qt installation, but it still doesn't work.

Daivik PaulDaivik Paul

16 Answers

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:

Reinstalling didn't fix it.

What helped was this (found here):Look for the Anaconda directory and set the Libraryplugins subdir (here c:ProgramDataAnaconda3Libraryplugins) 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.

Et voilà!

Update: 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:UserschrisAppDataLocalProgramsMiKTeX 2.9miktexbinx64) fixed the problem for both programs.

Platformcxxlcxxl
2,7862 gold badges19 silver badges45 bronze badges

I found that this was being caused by having the MiKTeX binaries in my PATH variable; and the wrong Qt dll's were being found. I just needed to re-arrange the PATH entries.

(Dependency Walker is such a useful tool.)

Richard AylingRichard Ayling

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:

launchpadmcquacklaunchpadmcquack
4261 gold badge4 silver badges15 bronze badges

If installed PyQt5 and PySide2, I solved problem

Copy the following files

to

Si8
5,24518 gold badges79 silver badges167 bronze badges
Osama AdlyOsama Adly

I tried the following in Anaconda prompt, and it solved this problem:

conda remove qt

conda remove pyqt

conda install qt

conda install pyqt

Shu ZhangShu Zhang

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 -

  1. 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.

  2. Open Control Panel-> System Settings -> Advanced System Settings ->Environment Variables ->New. Set Variable Name: QT_PLUGIN_PATH , Variable Directory:UsersAppdataLocalContinuumAnaconda2Libraryplugins

  3. Restart Pycharm.

PranzellPranzell

If you want to visualize your matplotlibs in an alternative way, use a different backend that generates the graphs, charts etc.

import matplotlibmatplotlib.use('TKAgg')

This worked for me.

rakidedigamarakidedigama

I have found a solution that worked for me, follow the link given below.This solution includes a code snippet to add before you import any modules from Pyside2 or PyQt5 package.

Code Snippet(Available in Link also)

This solution works for PyQt5 and PySide2 modules. I don't know if it's relevant or not but I have added QT_PLUGIN_PATH environment variable in the system before.

#

Above solution enabled me test PySide2 scripts in IDLE.However, I faced the same error log when I tried to run a bundled script(exe).With some shallow debug, it's evident that plugin folder itself is missing. I fixed the problem by adding the plugin folder in the appropriate location.'C:Usersxxxx.spyder-py3My_QtProjectsProject 1distMyQt_1PySide2'

Sourabh DesaiSourabh Desai

Qt Platform Plugin Windows Error 1

On Windows

1- Copy the folder plastforms: C:Users%USERNAME%AppDataRoamingpyinstallerbincache00_py35_64bitpyqt5qtpluginsplatforms

2- Paste the folder platform into the folder location of the file .exe

Example:c:MyFolderyourFile.exec:MyFolderplatforms

Daniel GDaniel G

I copy the folderAnaconda3Librarypluginsplatformsto$where $ represents your project interpreter folder (Ex:'projectanaconda_envScripts') , because PyCharm calls the python.exe in this folder, not the one in Anaconda3. and solve my problem.

sontransontran

You may need to copy the 'plugins' file in on 'Anaconda3Library'(for example in my computer is 'S:Anaconda3Libraryplugins') to the same path of your .exe file.

C.ConleyC.Conley

Just add a system variable:

QT_QPA_PLATFORM_PLUGIN_PATH and set its value to the C:Python34Libsite-packagesPyQt4pluginsplatforms

Voila. Done

kunjung sherpakunjung sherpa

In my case, I had multiple combined problems in order to make PyQt5 run on Windows, see DLL load failed when importing PyQt5

Orsiris de JongOrsiris de Jong

SOLUTION FOR WINDOWS USERS

Qt Platform Plugin Windows Error

Create new environment variable with:

name: QT_PLUGIN_PATHpath: C:yourpythonpathLibsite-packagesPyQt5Qtplugins

after that exe file will work

PawelPawel

copy platforms from Anaconda3Libraryplugins and put it in the Anaconda3.for env put the platforms in the specific env folder

aawanaawan

I had the same issue with Qt 5.9 example btscanner.exe. What works in my case is:

  1. Create a folder where is btscanner.exe ( my is c:tempBlueTouth )
  2. Run from command prompt windeployqt.exe as follow: c:qtqt5.9.0msvc2015binwindeployqt c:tempBlueTouth/* windeplyqt is the standard Qt tool to packet your application with any neededlibraries or extra files and ready to deploy on other machine */

  3. Result should be something like that:

  1. If you take e look at c:tempBlueTouth folder will seethe folders iconengines, imageformats, platforms, translations,and files D3Dcompiler_47.dll, libEGL.dll, libGLESV2.dll, opengl32sw.dll,Qt5Bluetouth.dll, Qt5Core.dll, Qt5Gui.dll, Qt5Svg.dll, Qt5Widgets.dll.

These are all of the files and folders need to run btscanner.exe on this or another machine. Just copy whole folder on other machine and run the file.

Reinstall Qt Platform Plugin Windows

Nikolay Shevchenko
2,1404 gold badges21 silver badges26 bronze badges
SPirevSPirev

Not the answer you're looking for? Browse other questions tagged pythonpython-3.xpycharm or ask your own question.

Explore this ArticleQt 4.8 SDK Installation Instructions:Edit the Windows Vista/Windows 7 PATH:Edit the Windows 8 PATH:Qt 5.0 SDK Installation Instructions:Edit the Windows Vista/Windows 7 PATH:Edit the Windows 8 PATH:Show 3 more...Show less...Ask a QuestionRelated Articles

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 10 people, some anonymous, worked to edit and improve it over time.
The wikiHow Tech Team also followed the article's instructions, and validated that they work. Learn more...

Qt Platform Plugin Windows Download

The Qt Software Development Kit (SDK) is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI). It is a portable cross platform application user interface framework which works on the Windows, Linux and Mac OS X operating systems. Qt SDK helps you create graphical user interfaces (GUI's) for your applications that will run on Windows, Linux and Mac OS X. Some popular cross-platform applications that were created using the Qt SDK are KDE, Google Earth, Skype, Linux Multimedia Studio and the VLC multimedia player. Essentially cross-platform means that Qt applications that you create on Microsoft Windows via the source code are usually transferable to Linux and the Mac OS X operating systems and vice versa.Notes: Upgraded Qt SDK 4.8 instructions and added instructions for Qt SDK 5.0