• Register
0 votes
198 views

Problem :

I have just upgraded to a latest stable release of matplotlib (1.5.1) and everytime I import the matplotlib I get below 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.')

It always stalls for the few seconds.

Is this a expected behavior? Was it a same also before, but just without a printed message?

7 5 2
3,870 points

1 Answer

0 votes

Solution :

Please delete your below files:

fontList.cache
fontList.py3k.cache 
tex.cache 

From below locations

`~/.matplotlib`

~/.cache/fontconfig

It worked for me.

OR

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)

OR

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/*

OR

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.

9 7 4
38,600 points

Related questions

0 votes
1 answer 190 views
190 views
Problem: I have recently installed opencv with all the dependencies. After the successful installation I have tried to import matplotlib for the very simple example. I have started facing below error when I only tried to install matplotlib via the pip with pip install ... linux-gnu.so' Consider using the `--user` option or check the permissions. How can I install matplotlib without any error?
asked Aug 26 Raphael Pacheco 4.9k points
0 votes
1 answer 40 views
40 views
Problem : I am new to python. I have tried to install below softwares: Python 2.5.4, Numpy 1.5.0 win32, Matplotlib 1.0.0 win32, pywin32 218. After doing so much of hard work I am still unable to plot the graphs in Python. I am facing ... > from matplotlib._path import affine_transform ImportError: DLL load failed: The specified module could not be found. Can somebody help me in fixing this error?
asked Feb 22 mphil 2.3k points
0 votes
1 answer 1.1K views
1.1K views
Problem : I am learning Python. I have written a basic python script and trying to run the basic python script on the server: import matplotlib.pyplot as plot import numpy as nump x = nump.random.randn(80) y = nump.random.randn(80) plot.scatter(x, y, s=30) ... , useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable Why am I facing above error? How can I fix it?
asked Feb 25 mphil 2.3k points
0 votes
1 answer 1.4K views
1.4K views
Problem : The import matplotlib.pyplot as plt is is giving me the error with python2.7, anaconda3. The error shown is as below: ImportError: libGL.so.1: cannot open shared object file: No such file or directory The Detailed Error report is as below : Traceback ... <module> from PyQt5 import QtCore, QtGui, QtWidgets ImportError: libGL.so.1: cannot open shared object file: No such file or directory
asked Dec 18, 2019 alecxe 7.5k points
0 votes
1 answer 628 views
628 views
Problem: I am having the conda environment where Numpy, SciPy and TensorFlow are installed. Conda is using the Intel(R) MKL Optimizations. The Anaconda has packaged the MKL-powered binary versions of some of the most popular numerical/scientific Python ... cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.
asked Nov 25, 2019 alecxe 7.5k points