0

今天下午安装进度条后,我在导入 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 实用程序

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

4

0 回答 0