# "UserWarning: Matplotlib is building the font cache using fc-list." never resolves

Hi,

I just downloaded and installed Sage 9.0 on windows. Typing the following:

plot(x^3, (x,0,5))


Gives the following error:

/opt/sagemath-9.0/local/lib/python3.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
'Matplotlib is building the font cache using fc-list. '


The kernel is running and nothing happens, even after waiting for a long time.

I did some googling. This stackexchange answer suggesting using

import matplotlib as mpl
print mpl.get_cachedir()


To get the directory of matplotlib, in order to (as suggested here) delete these files:

fontList.cache
fontList.py3k.cache
tex.cache


I did this, the folder I got was: /home/sage/.sage/matplotlib-1.5.1

But this folder is empty (according to the Sage shell). There are no files to delete there.

Any suggestions for how to get plot to work?

Thanks.

edit retag close merge delete

I downgraded to Sage 8.8 and now the plot command works as expected.

( 2020-01-14 09:50:33 +0200 )edit
2

I experienced the same problem. I first tried to upgrade matplotlib by launching the sagemath shell running pip install --upgrade matplotlib. Then I use the following command to try the plotting function P = matrix_plot(matrix(2,[1,1,3,3])) and then P. If for the first time the console hangs at the message "Matplotlib is building the font cache using fc-list.", then press ctrl+c to break it and try the plot function again. Since I cannot replicate the problem now I am not sure if this is the solution to the problem. Good luck.

( 2020-01-16 12:02:36 +0200 )edit

Sort by » oldest newest most voted

I had the same problem. I did the following:

1- Upgrade matplotlib by launching the sagemath shell running pip install --upgrade matplotlib.

2- I installed matploplib in a different virtualenv. This created a folder called ~/.matplotlib.

3- I copied the content of ~/.matplotlib to /home/sage/.sage/matplotlib-1.5.1.

It solved the issue for me.

more

Thanks for answering. The latest version of Sage 9 is working for me now though.

( 2020-02-19 13:14:44 +0200 )edit

Please start posting anonymously - your entry will be published after you log in or create a new account.

## Stats

Asked: 2020-01-12 16:40:25 +0200

Seen: 2,634 times

Last updated: Jan 12 '20