This seems to be a common problem, but no solution that I have seen has worked for me. When I run the following python code in atom via a .py file:
import matplotlib.pyplot as plt
import numpy as np
xgraph = np.arange(100)
ygraph = xgraph + 1
plt.plot(xgraph, ygraph, '-')
I get the following error:
This application failed to start because it could not find or load the Qt
platform plugin "windows" in "".
Available platform plugins are: direct2d, minimal, offscreen, windows.
Reinstalling the application may fix this problem."
I have the atom packages ide-python
and language-python
installed, and running basic python x = 1
print(x)
works fine. It's only when I use matplotlib functions that I get this error.
My computer runs windows 10, 64 bit. I am using Anaconda version 4.5.4, conda-build version 3.10.5, and python version 3.6.5.
For some reason, the same code that gives me an error in atom and through the command line works perfectly in Spyder (3.2.8) and jupyter notebooks (1.0.0). However, I have been using atom for all of my projects and would like to continue doing so.
Common solutions I've seen online that haven't worked for me
- Removing non-ASCII characters from my file path- I never had any
- I already have qt version 5.9.6 installed
- I have uninstalled and reinstalled Anaconda
- I have created the system variable
QT_PLUGIN_PATH
and set it to C:\Users\USER_NAME\Anaconda3\Library\plugins\platforms - I pointed my path variable to the same file location as the previous bullet.
- I have put qdirect2d.dll, qminimal.dll, qoffscreen.dll, and qwindows.dll into the same location as my qt.conf file and my python.exe, which is C:\Users\USER_NAME\Anaconda3
I am now at a loss. Any help is greatly appreciated. I am not terribly experienced with programming.