【发布时间】:2016-04-18 16:38:02
【问题描述】:
我刚刚升级到matplotlib (1.5.1) 的最新稳定版本,每次导入 matplotlib 时都会收到以下消息:
/usr/local/lib/python2.7/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
...总是停顿几秒钟。
这是预期的行为吗?之前是不是也一样,只是没有打印出来的信息?
【问题讨论】:
-
相关:github.com/matplotlib/matplotlib/pull/5640。建议删除
~/.cache/matplotlib的内容,然后重试。这可能是权限问题 - 不应该每次都构建缓存 -
我还没有阅读最新的 cmets。谢谢!
-
这对我有用。在带有 python 2.7 的 Ubuntu 14.04.2 上,我删除了 ~/.cache/matplotlib/ 中的所有文件。起初我认为它不起作用,因为后来我收到了警告。但是在重建缓存文件后,警告就消失了。 :)
-
在 mod_wsgi+apache httpd+centos 组合中 - 当从浏览器发送请求时,httpd 只是等待说正在构建字体缓存......它等待超过 6 分钟然后继续on....并且永远不会完成字体更新。你能建议如何解决这个问题吗?谢谢
标签: python matplotlib