“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?
agoldI 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.
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.)
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:
launchpadmcquacklaunchpadmcquackIf installed PyQt5
and PySide2
, I solved problem
Copy the following files
to
Si8I tried the following in Anaconda prompt, and it solved this problem:
conda remove qt
conda remove pyqt
conda install qt
conda install pyqt
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:UsersAppdataLocalContinuumAnaconda2Libraryplugins
Restart Pycharm.
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.
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'
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
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.
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.
Just add a system variable:
QT_QPA_PLATFORM_PLUGIN_PATH and set its value to the C:Python34Libsite-packagesPyQt4pluginsplatforms
Voila. Done
In my case, I had multiple combined problems in order to make PyQt5 run on Windows, see DLL load failed when importing PyQt5
SOLUTION FOR WINDOWS USERS
Create new environment variable with:
name: QT_PLUGIN_PATHpath: C:yourpythonpathLibsite-packagesPyQt5Qtplugins
after that exe file will work
copy platforms from Anaconda3Libraryplugins and put it in the Anaconda3.for env put the platforms in the specific env folder
I had the same issue with Qt 5.9 example btscanner.exe. What works in my case is:
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 */
Result should be something like that:
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 Shevchenkothis 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):