所以我下载并安装了matplotlib。奇怪的是,当它们被放置在 home/user/Desktop 中时,我可以很好地运行这些示例,但是当我将它们移动到 home/user/Documents 时,它们停止工作并且我收到以下消息。他们阻止 matplotlib 导入的 Documents 文件夹有什么特别之处吗?
Traceback (most recent call last):
File "contour_manual.py", line 4, in <module>
import matplotlib.pyplot as plt
File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 23, in <module>
from matplotlib.figure import Figure, figaspect
File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py", line 18, in <module>
from axes import Axes, SubplotBase, subplot_class_factory
File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes.py", line 8454, in <module>
Subplot = subplot_class_factory()
File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes.py", line 8446, in subplot_class_factory
new_class = new.classobj("%sSubplot" % (axes_class.__name__),
AttributeError: 'module' object has no attribute 'classobj'