>>> from matplotlib import pyplot as plt
Traceback (most recent call last):
File \"\", line 1, in
from matplotlib imp
On jupyter notebook I solved this problem by this way:
Install "numpy-1.11.0b2+mkl-cp35-none-win_amd64.whl" from this page.
If there is still no change, it's worth trying to reinstall matplotlib by pip.
Just to add to ThePredator answer:
I had both 32 bit and 64 bit Python 2.7 installed. When I ran python from cmd, Windows would load 32 bit python, but when trying to run something with matplotlib, this error would pop up. I have a 64 bit machine
What I did to solve
pip
, so make sure Python directory is in your PATH AND just enter pip install matplotlib
in a command prompt and you should be fine.The error that you are getting is because you have installed the wrong component of matplotlib
(there are the 32 bit and 64 bit components
).
This page provides you all binaries (32bit,64bit) for Windows. It also includes other packages apart from matplotlib if you may be needing them in the future.
Try installing the proper version for your computer and it should work.
Also don't forget to check whether the Python version you are using is suitable for your computer (32bit or 64bit)
So the problem you are facing is one of these:
matplotlib
matplotlib
Python
itselfPython
itselfIf you are not sure about how your computer's processor handles information, please check THIS WEBSITE
To check which version of python you have installed, refer TO THIS QUESTION IN STACKOVERFLOW