Linux操作系统。导入matplotlib。没有这样的文件或目录:'/ tmp /matplotlib-username/fontList.cache

时间:2016-07-22 16:17:27

标签: python linux matplotlib

当我尝试导入matplotlib时,我得到下面的Traceback,因此,要导入它,我必须在linux终端中运行:chown -R mefistofeles: /home/mefistofeles/.config/matplotlib。然后,如果我重新启动计算机并再次导入matplotlib我得到相同的错误,如果首先运行chown -R mefistofeles: /home/mefistofeles/.config/matplotlib然后导入matplotlib也是同样的问题,所以我的问题是如何每次都跳过运行chown -R mefistofeles: /home/mefistofeles/.config/matplotlib我在电脑里开始我的生活?我在Linux Mint Cinnamon 17.2 Rafaela版本,我用sudo apt-get install python-matplotlib安装了模块。此外,我试图重新安装它,但没有工作。 提前谢谢。

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "setFile.py", line 13, in <module>
    import blobD
  File "blobD.py", line 20, in <module>
    from skimage import io
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/__init__.py", line 15, in <module>
    reset_plugins()
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 93, in reset_plugins
    _load_preferred_plugins()
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 73, in _load_preferred_plugins
    _set_plugin(p_type, preferred_plugins['all'])
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 85, in _set_plugin
    use_plugin(plugin, kind=plugin_type)
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 255, in use_plugin
    _load(name)
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 299, in _load
    fromlist=[modname])
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/_plugins/matplotlib_plugin.py", line 3, in <module>
    import matplotlib.pyplot as plt
  File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in <module>
    import matplotlib.colorbar
  File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in <module>
    import matplotlib.collections as collections
  File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23, in <module>
    import matplotlib.backend_bases as backend_bases
  File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 50, in <module>
    import matplotlib.textpath as textpath
  File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in <module>
    import matplotlib.font_manager as font_manager
  File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1356, in <module>
    _rebuild()
  File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1343, in _rebuild
    pickle_dump(fontManager, _fmcache)
  File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 939, in pickle_dump
    with open(filename, 'wb') as fh:
IOError: [Errno 2] No such file or directory: '/tmp/matplotlib-mefistofeles/fontList.cache'

0 个答案:

没有答案