- Qt Platform Plugin Windows Error 1
- Qt Platform Plugin Windows Error
- Reinstall Qt Platform Plugin Windows
- 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?
agoldThis 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.
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.
cxxlcxxlI 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.
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'
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
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
Qt Platform Plugin Windows Error
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:
- Create a folder where is btscanner.exe ( my is c:tempBlueTouth )
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:
- 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 ShevchenkoNot 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
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