“Matplotlib 的问题是使用 fc-list 构建字体缓存.这可能需要一点时间."在 MacOS 上 [英] Problems with "Matplotlib is building the font cache using fc-list. This may take a moment." on MacoS

查看:16
本文介绍了“Matplotlib 的问题是使用 fc-list 构建字体缓存.这可能需要一点时间."在 MacOS 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行 OS X 10.11.3,并且我已经安装了 Anaconda3-2.5.0-MacOSX-x86_64.pkg,其中包括 Matplotlib 1.5.1.当我尝试使用以下内容在 Jupyter 中导入 Matplotlib 时:

I am running OS X 10.11.3, and I have installed Anaconda3-2.5.0-MacOSX-x86_64.pkg which includes Matplotlib 1.5.1. When I try to import Matplotlib in Jupyter with the following:

import matplotlib.pyplot as pp

我收到一条很长的错误消息,开头如下:

I get a very long error message, beginning with the following:

/Users/hgbauer/anaconda/lib/python3.5/site-packages/matplotlib/font_manager.py:273:用户警告:Matplotlib 正在使用 fc-list 构建字体缓存.这可能需要一点时间.

/Users/hgbauer/anaconda/lib/python3.5/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.

无论我等待多长时间,消息都不会消失.

The message never goes away, no matter how long I wait.

我在一个相关的帖子中注意到:

I’ve noticed in a related thread:

matplotlib 导入时需要时间

这个问题可能需要删除 ~/.cache/matplotlib 的内容,但在这种情况下,Matplotlib 似乎是单独安装的,而不是作为 Anaconda 的一部分.

that the problem may require deleting the contents of ~/.cache/matplotlib, but in that situation, Matplotlib seems to have been installed separately rather than as a part of Anaconda.

我的问题是这样的:

如何访问 Anaconda 中的 ~/.cache/matplotlib 文件以删除内容?

How can I access the ~/.cache/matplotlib file in Anaconda in order to delete the contents?

任何建议将不胜感激.

推荐答案

要移除的文件在~/.matplotlib下,而不是~/.cache/matplotlib(出于迷信,您还想删除 ~/.cache/fontconfig,但错误的 .matplotlib 路径是大事)

The files to be removed are under ~/.matplotlib, rather than ~/.cache/matplotlib (you'll also want to remove ~/.cache/fontconfig out of superstition, but the wrong .matplotlib path was the big thing)

您应该在下次运行时再次看到该讨厌的消息,然后就不会再看到了.

You should see that pesky message again on your next run, then no more.

这篇关于“Matplotlib 的问题是使用 fc-list 构建字体缓存.这可能需要一点时间."在 MacOS 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆