Please delete your below files:
From below locations
It worked for me.
Below approach works for the Ubuntu 14.04 LTS/matplotlib 1.5.1:
· Deleted the ~/.cache/matplotlib/fontList.cache
· Ran my code then again the warning was issued (assumption: is rebuilding the cache correctly)
· Ran my code again, no more warning (finally)
On the OSX Yosemite (version 10.10.15), the below approach worked for me:
· Remove your cache files from following directory as well: ~/.cache/fontconfig (as per suggestion)
rm -rvf ~/.cache/fontconfig/*
· Also removed .cache files from ~/.matplotlib (as per suggestion)
rm -rvf ~/.matplotlib/*
I ran my python code using sudo just once, and it resolved a warning for me. Now it runs faster for me. Running without the sudo gives no warning at all.