我在 Windows 7 操作系统上运行 Python 2.7
这是我运行的:
>>> import matplotlib.pyplot as plt
然后我得到这个:
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
现在,我从这里下载了六个:https ://pypi.python.org/pypi/six
我解压缩了它,如果我从那里打开一个名为 setup.py 的文件,然后我尝试导入 matplotlib,那么它就可以工作了,但是我不必每次想制作一个情节时都这样做吗?有没有办法让它自动工作?