Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

import matplotlib.pyplot - fc-list hangs

I am experiencing the same problem as described in import matplotlib.pyplot hangs after updating my matplotlib version import matplotlib.pyplot as plt hangs while executing fc-list.

However, the proposed solution does not work for me; running fc-list in ~/.matplotlib takes 100% CPU and does not finish within 15 minutes.

I have the following configuration:

  • Mac, running OS 10.10.5 (OS X Yosemite)
  • Python 2.7.5
  • matplotlib 1.4.3 (was 1.3.1, no problems with that version)

To update my matplotlib version, I used:

sudo pip install matplotlib

If I re-run this command now, I get

Requirement already satisfied (use --upgrade to upgrade): matplotlib in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6 in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): pytz in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): pyparsing!=2.0.0,>=1.5.6 in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): nose>=0.11.1 in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4 in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): mock in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): funcsigs in /Library/Python/2.7/site-packages (from mock->matplotlib)
Requirement already satisfied (use --upgrade to upgrade): pbr>=0.11 in /Library/Python/2.7/site-packages (from mock->matplotlib)

and sudo pip install --upgrade matplotlib:

Requirement already up-to-date: matplotlib in /Library/Python/2.7/site-packages
Requirement already up-to-date: numpy>=1.6 in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already up-to-date: pytz in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already up-to-date: pyparsing!=2.0.0,>=1.5.6 in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already up-to-date: python-dateutil in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already up-to-date: nose>=0.11.1 in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already up-to-date: six>=1.4 in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already up-to-date: mock in /Library/Python/2.7/site-packages (from matplotlib)
Requirement already up-to-date: funcsigs in /Library/Python/2.7/site-packages (from mock->matplotlib)
Requirement already up-to-date: pbr>=0.11 in /Library/Python/2.7/site-packages (from mock->matplotlib)

I have a fontList.cache file in ~/.matplotlib. This file is old (dating back to 2013, thus older than this update attempt).

Questions:

  1. Despite the fontList.cache file, should I run fc-list, expecting it to finish at some point?
  2. Is matplotlib expecting to find the fontList.cache file in a different location? Maybe my install/update of matplotlib messed up some path - but: matplotlib.get_cachedir() returns /Users/MyName/.matplotlib
  3. Has the filename changed? Should I rename fontList.cache?
  4. I do not have the /usr/X11/lindirectory anymore. However, could fc-list still enter an infinite loop as suggested?
like image 258
Schorsch Avatar asked May 20 '26 16:05

Schorsch


1 Answers

I cannot reproduce the problem after posting the question.


I suspect that (re-)running

sudo pip install matplotlib

and/or

sudo pip install --upgrade matplotlib

while writing the question (to capture the on-screen output) fixed the previously existing issue.

fc-list now finished within 2 minutes; hough it did not create a new fontList.cache file.


I can now call import matplotlib.pyplot as plt as before.

like image 164
Schorsch Avatar answered May 23 '26 05:05

Schorsch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!