Python:导入模块matplotlib的错误问题

时间:2012-10-12 15:52:25

标签: python matplotlib runtime-error

安装进度条后的今天下午我输入matplolib时遇到了这个问题:

>>> import matplotlib
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 772, in <module>
    rcParams = rc_params()
  File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 690, in rc_params
    fname = matplotlib_fname()
  File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 602, in matplotlib_fname
    fname = os.path.join(get_configdir(), 'matplotlibrc')
  File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 253, in wrapper
    ret = func(*args, **kwargs)
  File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 475, in _get_configdir
    raise RuntimeError("'%s' is not a writable dir; you must set %s/.matplotlib to be a writable dir.  You can also set environment variable MPLCONFIGDIR to any writable directory where you want matplotlib data stored "% (h, h))
RuntimeError: 'C:\Users\ALEM' is not a writable dir; you must set C:\Users\ALEM/.matplotlib to be a writable dir.  You can also set environment variable MPLCONFIGDIR to any writable directory where you want matplotlib data stored 

我曾尝试在Windows 7 64位上多次重新安装matplolib和python 27,但我总是犯同样的错误。

错误消息显示:

  

请运行chkdsk实用程序

但是我不明白这个实用程序在哪里以及如何运行它。

0 个答案:

没有答案