• Register
0 votes
352 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

Please log in or register to answer this question.

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 11 views
11 views
Problem: How can I put the text in the upper left (or upper right) corner of the matplotlib plot, such as where the top left legend will be, or on top of the plot but in the upper left corner? For example. if it is plt.scatter (), then something that is ... in the upper right corner. When positioning the legend type, it must not overlap with any points on the scatter plot in any case. Thank you!
asked Dec 30, 2020 sasha 5.3k points
0 votes
1 answer 1K views
1K 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, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 52 views
52 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, 2020 mphil 2.3k points
0 votes
1 answer 1.7K views
1.7K 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, 2020 mphil 2.3k points
0 votes
1 answer 1.8K views
1.8K 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 823 views
823 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
1 vote
1 answer 191 views
191 views
Problem: I have been doing programming for a while and I am using python for this. So my question is What is an advantage of using a tuple rather than a list? Thank you
asked Apr 6, 2020 LizzyM 6.1k points
0 votes
1 answer 9 views
9 views
Problem: I have a terrible feeling that this will be a duplicate, I have already tried my best to find the answer. I have a dictionary and a list, and I want to create a list of dictionaries using a list to overwrite one of the key values, for example: d={"a":1,"b":10} c=[3,4,5 ... is a neater way with an iterator like arg=[d *with* d[a]=i for i in c] Where I'm not sure what to put instead of "c".
asked Dec 30, 2020 sasha 5.3k points
0 votes
1 answer 29 views
29 views
I want to take multiple inputs from user at the same time and form a list. Please help me.
asked Oct 10, 2020 Ahsan 1.8k points
0 votes
1 answer 4 views
4 views
Problem: I want to take a number from user and take a list of elements as a user input.how can do this in python
asked Oct 9, 2020 kalyani456 280 points