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: 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 taking time when being imported
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.
My question is this:
How can I access the ~/.cache/matplotlib file in Anaconda in order to delete the contents?
Any suggestions would be very much appreciated.
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.
You can find this out with get_cachedir()
. For example in python 2:
import matplotlib as mpl
print mpl.get_cachedir()
and in python 3:
import matplotlib as mpl
print(mpl.get_cachedir())
See here for more information
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With