之前我们已经看到你的问题 在matplotlib-user邮件列表中报告了这一点 。决议 在这儿 并确认它的工作原理 在这儿 。
总之,您需要清除tex.cache目录。
要找到该目录的位置 - 进入python并执行 matplotlib.get_cachedir()
matplotlib.get_cachedir()
对于标准的Ubuntu 14.04安装 - 您应该得到如下内容:
~$ python3 Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib as mpl >>> mpl.get_cachedir() '/home/<username>/.cache/matplotlib'
然后做 rm <path/to/cache/from/above>/tex.cache/* 然后重新运行它应该都可以工作。
rm <path/to/cache/from/above>/tex.cache/*
像这样的一些提示可以在 usetex故障排除文档部分 ,这导致 这里 找到目录, 但不幸的是他们没有提到 get_cachedir()
get_cachedir()
的 编辑 强> 拉请求 基于此问题生成并合并到matplotlib文档中。