I have many error's when I import matplotlib in Python. All the error's is from the program init .py of matplotlib
First:
So I download the whl file of this site: https://www.lfd.uci.edu/~gohlke/pythonlibs/#distribute Document: matplotlib-2.2.0rc1-cp27-cp27m-win32.whl
I opened the CMD and did: Python -m pip install matplotlib-2.2.0rc1-cp27-cp27m-win32.whl
This was succesfull (I tried the different versions but it give me always the same error's.)
So I opened Idle version 2.7.14 and tried to import matplotlib:
import matplotlib
And this gives me this error's:
Traceback (most recent call last):
File "C:\Python27\j.py", line 1, in <module>
import matplotlib
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 134, in <module>
from six.moves.urllib.request import urlopen
ImportError: No module named urllib.request
>>>
I don't understand why they give me error's in this program... By the way I supposed to work with python 2.7 not Python3 so this is not a solution...
Can someone help me?
To provide an answer useful for future readers:
Matplotlib requires six 1.10 or higher to work correctly.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.