ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 19 Feb 2020 13:14:44 +0100"UserWarning: Matplotlib is building the font cache using fc-list." never resolveshttps://ask.sagemath.org/question/49517/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](https://stackoverflow.com/questions/35734074/problems-with-matplotlib-is-building-the-font-cache-using-fc-list-this-may-tak) suggesting using
import matplotlib as mpl
print mpl.get_cachedir()
To get the directory of matplotlib, in order to (as suggested [here](https://stackoverflow.com/questions/34771191/matplotlib-taking-time-when-being-imported)) 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.Sun, 12 Jan 2020 16:40:25 +0100https://ask.sagemath.org/question/49517/userwarning-matplotlib-is-building-the-font-cache-using-fc-list-never-resolves/Comment by eod for <p>Hi,</p>
<p>I just downloaded and installed Sage 9.0 on windows. Typing the following:</p>
<pre><code>plot(x^3, (x,0,5))
</code></pre>
<p>Gives the following error:</p>
<pre><code>/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. '
</code></pre>
<p>The kernel is running and nothing happens, even after waiting for a long time.</p>
<p>I did some googling. <a href="https://stackoverflow.com/questions/35734074/problems-with-matplotlib-is-building-the-font-cache-using-fc-list-this-may-tak">This stackexchange answer</a> suggesting using</p>
<pre><code>import matplotlib as mpl
print mpl.get_cachedir()
</code></pre>
<p>To get the directory of matplotlib, in order to (as suggested <a href="https://stackoverflow.com/questions/34771191/matplotlib-taking-time-when-being-imported">here</a>) delete these files:</p>
<pre><code>fontList.cache
fontList.py3k.cache
tex.cache
</code></pre>
<p>I did this, the folder I got was:
/home/sage/.sage/matplotlib-1.5.1</p>
<p>But this folder is empty (according to the Sage shell). There are no files to delete there.</p>
<p>Any suggestions for how to get plot to work? </p>
<p>Thanks.</p>
https://ask.sagemath.org/question/49517/userwarning-matplotlib-is-building-the-font-cache-using-fc-list-never-resolves/?comment=49541#post-id-49541I downgraded to Sage 8.8 and now the plot command works as expected.Tue, 14 Jan 2020 09:50:33 +0100https://ask.sagemath.org/question/49517/userwarning-matplotlib-is-building-the-font-cache-using-fc-list-never-resolves/?comment=49541#post-id-49541Comment by ray8_3 for <p>Hi,</p>
<p>I just downloaded and installed Sage 9.0 on windows. Typing the following:</p>
<pre><code>plot(x^3, (x,0,5))
</code></pre>
<p>Gives the following error:</p>
<pre><code>/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. '
</code></pre>
<p>The kernel is running and nothing happens, even after waiting for a long time.</p>
<p>I did some googling. <a href="https://stackoverflow.com/questions/35734074/problems-with-matplotlib-is-building-the-font-cache-using-fc-list-this-may-tak">This stackexchange answer</a> suggesting using</p>
<pre><code>import matplotlib as mpl
print mpl.get_cachedir()
</code></pre>
<p>To get the directory of matplotlib, in order to (as suggested <a href="https://stackoverflow.com/questions/34771191/matplotlib-taking-time-when-being-imported">here</a>) delete these files:</p>
<pre><code>fontList.cache
fontList.py3k.cache
tex.cache
</code></pre>
<p>I did this, the folder I got was:
/home/sage/.sage/matplotlib-1.5.1</p>
<p>But this folder is empty (according to the Sage shell). There are no files to delete there.</p>
<p>Any suggestions for how to get plot to work? </p>
<p>Thanks.</p>
https://ask.sagemath.org/question/49517/userwarning-matplotlib-is-building-the-font-cache-using-fc-list-never-resolves/?comment=49571#post-id-49571I 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.Thu, 16 Jan 2020 12:02:36 +0100https://ask.sagemath.org/question/49517/userwarning-matplotlib-is-building-the-font-cache-using-fc-list-never-resolves/?comment=49571#post-id-49571Answer by Carlos Fernández for <p>Hi,</p>
<p>I just downloaded and installed Sage 9.0 on windows. Typing the following:</p>
<pre><code>plot(x^3, (x,0,5))
</code></pre>
<p>Gives the following error:</p>
<pre><code>/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. '
</code></pre>
<p>The kernel is running and nothing happens, even after waiting for a long time.</p>
<p>I did some googling. <a href="https://stackoverflow.com/questions/35734074/problems-with-matplotlib-is-building-the-font-cache-using-fc-list-this-may-tak">This stackexchange answer</a> suggesting using</p>
<pre><code>import matplotlib as mpl
print mpl.get_cachedir()
</code></pre>
<p>To get the directory of matplotlib, in order to (as suggested <a href="https://stackoverflow.com/questions/34771191/matplotlib-taking-time-when-being-imported">here</a>) delete these files:</p>
<pre><code>fontList.cache
fontList.py3k.cache
tex.cache
</code></pre>
<p>I did this, the folder I got was:
/home/sage/.sage/matplotlib-1.5.1</p>
<p>But this folder is empty (according to the Sage shell). There are no files to delete there.</p>
<p>Any suggestions for how to get plot to work? </p>
<p>Thanks.</p>
https://ask.sagemath.org/question/49517/userwarning-matplotlib-is-building-the-font-cache-using-fc-list-never-resolves/?answer=49840#post-id-49840I 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.Fri, 07 Feb 2020 11:29:00 +0100https://ask.sagemath.org/question/49517/userwarning-matplotlib-is-building-the-font-cache-using-fc-list-never-resolves/?answer=49840#post-id-49840Comment by eod for <p>I had the same problem. I did the following:</p>
<p>1- Upgrade matplotlib by launching the sagemath shell running <code>pip install --upgrade matplotlib</code>.</p>
<p>2- I installed matploplib in a different virtualenv. This created a folder called <code>~/.matplotlib</code>.</p>
<p>3- I copied the content of <code>~/.matplotlib</code> to <code>/home/sage/.sage/matplotlib-1.5.1</code>.</p>
<p>It solved the issue for me.</p>
https://ask.sagemath.org/question/49517/userwarning-matplotlib-is-building-the-font-cache-using-fc-list-never-resolves/?comment=49979#post-id-49979Thanks for answering. The latest version of Sage 9 is working for me now though.Wed, 19 Feb 2020 13:14:44 +0100https://ask.sagemath.org/question/49517/userwarning-matplotlib-is-building-the-font-cache-using-fc-list-never-resolves/?comment=49979#post-id-49979