• Register
0 votes
501 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 32 views
32 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 16.2k points
0 votes
1 answer 22 views
22 views
Problem: I want to understand examples are included in the examples directory of the basemap source distribution. There are a number of Basemap instance methods for plotting data: I Want to understand these methods plotting in detail. contour(): draw contour lines. contourf(): ... for regular meshes). plot(): draw lines and/or markers. scatter(): draw points with markers. quiver(): draw vector
asked Jan 26 Mashhoodch 13k points
0 votes
1 answer 2.5K views
2.5K 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 6 views
6 views
Problem: Can someone tell me Which command is used to save a plot in python?
asked Mar 10 ummesalma 22k points
0 votes
1 answer 2 views
2 views
Problem: Which symbol is used in pipe command to group two commands do you have any solution?
asked Mar 30 tuhin1 46.8k points
0 votes
1 answer 80 views
80 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 5 views
5 views
Problem: Please help me … how can I solve it? valueerror: err must be [ scalar | n, nx1 or 2xn array-like ]
asked Mar 31 Ifra 24.4k points
0 votes
1 answer 3 views
3 views
Problem: Please help me … how can I solve it? runtimewarning: invalid value encountered in divide
asked Mar 22 Ifra 24.4k points
0 votes
1 answer 20 views
20 views
Problem: I'm trying to show a color bar of my scatter plot but I'm keep getting the error: TypeError: You must first set_array for mappable Thank you in advance.
asked Mar 16 ummesalma 22k points
0 votes
1 answer 17 views
17 views
Problem: Why this happened: Tkinter.tclerror: no display name and no $display environment variable
asked Mar 14 Wafa Abu Yousef 6.1k points