3

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?
1
  • Given that I cannot reproduce my own problem, I leave it to the community to VtC if we feel that the Q/A pair here would not help future users. Commented Oct 17, 2015 at 17:22

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I also ran into this problem, but merely waiting resulted in the program eventually terminating. And then on a second execution it worked quickly. I think it was building some kind of font cache that only needed to be done once.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.