I am running Python 2.7 on a Windows 7 OS
Here is what I run:
>>> import matplotlib.pyplot as plt
Then I get this:
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 29, in <module>
from matplotlib.figure import Figure, figaspect
File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 36, in <module>
from matplotlib.axes import Axes, SubplotBase, subplot_class_factory
File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 20, in <module>
import matplotlib.dates as _ # <-registers a date unit converter
File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 119, in <module>
from dateutil.rrule import (rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY,
File "C:\Python27\lib\site-packages\dateutil\rrule.py", line 18, in <module>
from six import advance_iterator, integer_types
ImportError: No module named six
Now, I have downloaded six from here : https://pypi.python.org/pypi/six
I unzipped it and if I open up a file from there called setup.py and then I try to import matplotlib then it works, but I don;t have to do this every time I want to make a plot do I? Isn't there a way to get this to work automatically?
I got exactly the same error message. And it seams there are many many possible causes. In my case, I solved the issue by reinstalling six
pip uninstall six ; pip install six
I guess the previous installation was aborted before a complete termination. Or maybe a permission issue. Or something else ... now it's too late to investigate what was the real cause.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With