在执行handle_bar()
时更新我的matplotlib版本import matplotlib.pyplot as plt
后,我遇到与import matplotlib.pyplot hangs中所述相同的问题。
然而,the proposed solution对我不起作用;在fc-list
中运行fc-list
需要100%的CPU,并且在15分钟内无法完成。
我有以下配置:
要更新我的matplotlib版本,我使用了:
~/.matplotlib
如果我现在重新运行此命令,我会
sudo pip install matplotlib
和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)
:
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)
中有fontList.cache
个文件。此文件是旧的(可追溯到2013年,因此比此更新尝试更早)。
问题:
~/.matplotlib
文件,我应该运行fontList.cache
,期望它在某个时候完成吗? fc-list
文件?也许我的matplotlib的安装/更新搞砸了一些路径 - 但是:matplotlib.get_cachedir()
返回fontList.cache
/Users/MyName/.matplotlib
吗?fontList.cache
目录了。但是,/usr/X11/lin
仍然可以进入无限循环as suggested?答案 0 :(得分:2)
发布问题后我无法重现问题。
我怀疑(重新)正在运行
sudo pip install matplotlib
和/或
sudo pip install --upgrade matplotlib
在编写问题时(捕获屏幕输出)修复了以前存在的问题。
fc-list
现在在2分钟内完成;虽然它没有创建一个新的fontList.cache
文件。
我现在可以像以前一样致电import matplotlib.pyplot as plt
。