Hello everyone, my name is Sara Lopez from Madrid, Spain. I have been subscribing to Creative Cloud for several years since the CC version. I have never.
Active14 days ago
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,81877 gold badges2929 silver badges4949 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 cxxlcxxl
QT_PLUGIN_PATH to the directory containing TexWorks' Qt DLLs (here C:UserschrisAppDataLocalProgramsMiKTeX 2.9miktexbinx64 ) fixed the problem for both programs.
2,78622 gold badges1919 silver badges4545 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
42611 gold badge44 silver badges1515 bronze badges
If installed
PyQt5 and PySide2 , I solved problem
Copy the following files
to
Si8
5,2451818 gold badges7979 silver badges167167 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 -
PranzellPranzell
Free games galactic gems 2. 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
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 Leisure suit larry free.
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
Onedrive Qt Platform Plugin Windows
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:
Qt Platform Plugin Windows Error 1
Qt Platform Plugin Windows Error Python
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,14044 gold badges2121 silver badges2626 bronze badges
SPirevSPirev
Not the answer you're looking for? Browse other questions tagged pythonpython-3.xpycharm or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |