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

问题描述

我正在运行OS X 10.11.3,并且已经安装了包含Matplotlib 1.5.1的Anaconda3-2.5.0-MacOSX-x86_64.pkg.当我尝试使用以下命令在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:

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

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?

任何建议将不胜感激.

Any suggestions would be very much appreciated.

推荐答案

要删除的文件位于~/.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上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 03:24