I just upgraded to the latest stable release of matplotlib
(1.5.1) and everytime I import matplotlib I get this message:
/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.')
... which always stalls for a few seconds.
Is this the expected behaviour? Was it the same also before, but just without the printed message?
It's your bottleneck. In your case, you don't need to re-draw things like the axes boundaries, tick labels, etc. 2) In your case, there are a lot of subplots with a lot of tick labels. These take a long time to draw.
The error is caused because of the following reasons, check them out: Make sure that the version of matplotlib you are installing is compaitible with your python version installed. If the python installed is 64 bits version with matplotlib is 32bits. Make sure they are the same.
Download the “Install Matplotlib (for Mac)” file from my web site, and double-click it to run it. Test your installation. Start IDLE, type “import matplotlib”, and confirm that this command completes without an error.
As tom suggested in the comment above, deleting the files:
fontList.cache fontList.py3k.cache tex.cache
solve the problem. In my case the files were under:
`~/.matplotlib`
EDITED
A couple of days ago the message appeared again, I deleted the files in the locations mention above without any success. I found that as suggested here by T Mudau there's an extra location with text cache files is: ~/.cache/fontconfig
Confirmed Hugo's approach works for Ubuntu 14.04 LTS/matplotlib 1.5.1:
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