Could Not Find Qt Platform Plugin Windows
Active12 days ago

“Failed to load platform plugin ”xcb“ ” while launching qt5 app on linux without qt installed. But when I am trying to launch it on the linux without Qt SDK installed, the output in console is: Failed to load platform plugin 'xcb'. (2, 'This application failed to start'., 154This application failed to start because it could not. 问题解决:it could not find or load the Qt platform plugin "windows" Qt5程序错误:could not find or load the Qt platform plugin "windows" Qt5 中发布程序遇到could not find or load the Qt platform plugin 'windows' This application failed to start because it could not find or load the Qt platform plugin 'xcb'. PySide2 this application failed to start because it could not find or load the Qt platform plugin 'windows' in ' Log In. XML Word Printable. This application failed to start because it could not find or load the Qt platform plugin 'windows' in '. It said: This application failed to start because it could not find or load the Qt platform plugin “windows” in “”. Reinstalling the application may fix this problem. My current Windows 10 is version 1703, OS build 15063.674. I knew OneDrive is the builtin with Windows 10. It can not be uninstall like a normal. It said: This application failed to start because it could not find or load the Qt platform plugin “windows” in “”. Reinstalling the application may fix this problem. My current Windows 10 is version 1703, OS build 15063.674. I knew OneDrive is the builtin with Windows 10. It can not be uninstall like a normal program. Jun 17, 2018  This application failed to start because it could not find or load the Qt platform plugin 'windows' in '. Reinstalling the application may fix this problem. I am fairly tech-savvy for someone with no official training, but all of the resources that I can find to.

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,8087 gold badges29 silver badges49 bronze badges
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.

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

Could Not Find Or Load Qt Platform Plugin Windows Python

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,23518 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.

Hex Loops presents Hip Hop Free Drum Sound Kit, a freeware sample pack for any Hip Hop beatmaker who wants to get out of routine. Drum kit download fl studio.

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.

Qt Platform Plugin Windows Install

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

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

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.

Nikolay Shevchenko
2,1304 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.

  • Status:Reported
  • Resolution: Unresolved
  • Fix Version/s: None
  • Labels:
  • Environment:
    win7,10 amd64
    qt5.6.2 qt5.9.1 amd64
    python3.5 amd64

this application failed to start because it could not find or load the Qt platform plugin 'windows' in '.
Reinstalling the application may fix this problem.

Reason (Lib/site-packages/PySide2/_init_.py):
_utils.register_qt_conf(prefix=prefix,
binaries=prefix,
plugins=prefix+'/plugins',
imports=prefix+'/imports', #Compile the generated PySide2 package without the 'imports' directory
translations=prefix+'/translations')

Solution (Lib/site-packages/PySide2/_utils.py):

Gerrit Reviews

No reviews matched the request. Check your Options in the drop-down menu of this sections header.
  • Assignee:
    Christian Tismer
    Reporter:
    ming liu
  • Votes:
    0Vote for this issue
    Watchers:
    5Start watching this issue
  • Created:
    Updated: