This is another font issue. This is similar to this one, although the solution found there doesn't work for me. I am on OSX 10.6 using python 2.7.6. I installed the latest via git. That went fine. I can import matplotlib:
I found some relatedissues. It turns out my fontCache got deleted from the ~/.matplotlib/ directory. Where the import was appearing to stall, was just the fc-list call be executed. This call took about 10 or 15 minutes to execute, but now that the cache is built, everything is dandy.
The most I have ever seen was 2 minutes. Maybe we need to do something to
at least output a message (via logging, of course) to give a user a heads
up on what might be happening. Another thing to look into is to see how we
could constrain the fc-list call to keep it from taking a ridiculous amount
of time.
How many fonts to you have installed on your system? Are any on slow media, such as network drives? 10-15 minutes seems way out of line. fc-list takes 0.022 seconds on my system.
Ok I apologize. My impatience is warping my perception of time because:
$ time fc-list
....font lists...
real 1m44.781s
user 0m59.607s
sys 0m23.015s
In any case, I think you're right about an output message because this could've been resolved by simply letting the thing run. Instead, I assumed there was an error, and continued aborting and hunting tracebacks. Perhaps if there was a check to see if the matplotlib fontCache exists and if not, prompt a message.
Because that is not the solution. What happens is that matplotlib calls fc-list on the first import of pyplot to create the font cache. Unfortunately this can be really slow on some systems but it's not really an issue in matplotlib. No where in this issue is there any indication of anything hanging forever. It will hang for the time it takes to execute fc-list only.
Sorry, I meant forever in the colloquial sense. Most users have been trained by convention to expect that any program that produces no visual output for more than several seconds without warning has crashed - I know I have. Could we at least print a line saying something like "Running fc-list. This may take up to several minutes." ?
I'm also suffering from a slow fc-list import. A warning in the console would be appreciated. The only reason I spotted that the kernel wasn't hung was due to htop.
@RichardoC there already is a warning at import time in 1.5.1 see #5640 also see #5836 for users whishing to remove it again. Are you using an older version of matplotlib?
Activity
notmatthancock commented on Mar 25, 2014
I found some related issues. It turns out my fontCache got deleted from the ~/.matplotlib/ directory. Where the import was appearing to stall, was just the fc-list call be executed. This call took about 10 or 15 minutes to execute, but now that the cache is built, everything is dandy.
WeatherGod commented on Mar 25, 2014
10 to 15 minutes?!
The most I have ever seen was 2 minutes. Maybe we need to do something to
at least output a message (via logging, of course) to give a user a heads
up on what might be happening. Another thing to look into is to see how we
could constrain the fc-list call to keep it from taking a ridiculous amount
of time.
On Tue, Mar 25, 2014 at 12:06 PM, chestervonwinchester <
notifications@github.com> wrote:
mdboom commented on Mar 25, 2014
How many fonts to you have installed on your system? Are any on slow media, such as network drives? 10-15 minutes seems way out of line. fc-list takes 0.022 seconds on my system.
notmatthancock commented on Mar 25, 2014
Ok I apologize. My impatience is warping my perception of time because:
In any case, I think you're right about an output message because this could've been resolved by simply letting the thing run. Instead, I assumed there was an error, and continued aborting and hunting tracebacks. Perhaps if there was a check to see if the matplotlib fontCache exists and if not, prompt a message.
I have ~2461 fonts and no slow media.
ialexryan commented on Dec 8, 2015
Why is this closed? Even if the solution is as simple as running fc-list, there should be some sort of error instead of just hanging forever.
jenshnielsen commented on Dec 8, 2015
Because that is not the solution. What happens is that matplotlib calls fc-list on the first import of pyplot to create the font cache. Unfortunately this can be really slow on some systems but it's not really an issue in matplotlib. No where in this issue is there any indication of anything hanging forever. It will hang for the time it takes to execute fc-list only.
ialexryan commented on Dec 8, 2015
Sorry, I meant forever in the colloquial sense. Most users have been trained by convention to expect that any program that produces no visual output for more than several seconds without warning has crashed - I know I have. Could we at least print a line saying something like "Running fc-list. This may take up to several minutes." ?
RichardoC commented on Apr 11, 2016
I'm also suffering from a slow fc-list import. A warning in the console would be appreciated. The only reason I spotted that the kernel wasn't hung was due to htop.
jenshnielsen commented on Apr 12, 2016
@RichardoC there already is a warning at import time in 1.5.1 see #5640 also see #5836 for users whishing to remove it again. Are you using an older version of matplotlib?
RichardoC commented on Apr 12, 2016
Just updated and the warning is now showing up. It's a nice feature to have.
Move imports of the interact procedure behind