Problems with "Matplotlib builds the font cache using fc-list. This may take some time." on macos

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 into Jupyter with the following:

import matplotlib.pyplot as pp 

I get a very long error message starting with the following:

/Users/hgbauer/anaconda/lib/python3.5/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib creates a font cache using fc-list. This may take some time.

The message never disappears, no matter how long I wait.

I noticed in a related thread:

matplotlib takes time to import

that the problem may require the removal of the contents of ~ / .cache / matplotlib, but in this situation Matplotlib seems to have been installed separately and not as part of Anaconda.

My question is:

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

Any suggestions would be much appreciated.

+8
matplotlib jupyter anaconda macos
Mar 01 '16 at 21:39
source share
2 answers

The files you need to delete are under ~/.matplotlib and not ~/.cache/matplotlib (you also want to remove ~/.cache/fontconfig from superstition, but the wrong .matplotlib path was a big thing)

You should see this annoying message again at the next start, and then more.

+5
Apr 6 '16 at 4:13
source share

You can find this with get_cachedir() . For example:

 import matplotlib as mpl print mpl.get_cachedir() 

See here for more details.

+4
Mar 02 '16 at 13:18
source share



All Articles