Python Matplotlib已停止工作,并出现很长的错误。。。有什么建议吗?
我一直在尝试以不同的方式安装numpy/scipy,并确保我有lapack/blas支持,但不知怎么搞的把事情搞砸了,所以现在当我做一个简单的绘图时,它不起作用,我需要键入+c来中断,然后得到这个冗长的错误消息。有什么解决办法吗?我已经安装和卸载了python/numpy/scipy/matplotlib好几次了,但都没有成功 我在Ubuntu 14.04上Python Matplotlib已停止工作,并出现很长的错误。。。有什么建议吗?,python,numpy,matplotlib,Python,Numpy,Matplotlib,我一直在尝试以不同的方式安装numpy/scipy,并确保我有lapack/blas支持,但不知怎么搞的把事情搞砸了,所以现在当我做一个简单的绘图时,它不起作用,我需要键入+c来中断,然后得到这个冗长的错误消息。有什么解决办法吗?我已经安装和卸载了python/numpy/scipy/matplotlib好几次了,但都没有成功 我在Ubuntu 14.04上 Exception in Tkinter callback Traceback (most recent call last): Fi
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1489, in __call__
return self.func(*args)
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 536, in callit
func(*args)
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line 363, in idle_draw
self.draw()
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line 348, in draw
FigureCanvasAgg.draw(self)
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line 451, in draw
self.figure.draw(self.renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1034, in draw
func(*args)
File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 2086, in draw
a.draw(renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1093, in draw
renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1042, in _get_tick_bboxes
extent = tick.label1.get_window_extent(renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 754, in get_window_extent
bbox, info, descent = self._get_layout(self._renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 320, in _get_layout
ismath=False)
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line 214, in get_text_width_height_descent
font = self._get_agg_font(prop)
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line 258, in _get_agg_font
fname = findfont(prop)
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1362, in findfont
font = fontManager.findfont(prop, **kw)
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1258, in findfont
_rebuild()
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1341, in _rebuild
fontManager = FontManager()
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1004, in __init__
self.ttflist = createFontList(self.ttffiles)
File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 575, in createFontList
font = ft2font.FT2Font(str(fpath))
KeyboardInterrupt
Traceback (most recent call last):
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1484, in __call__
def __call__(self, *args):
KeyboardInterrupt
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
编辑:
引发错误的代码是:
from matplotlib import pyplot as plt
plt.ion()
plt.plot(range(10))
# window doesn't show anything hangs, I end up typing <ctrl>+c and then the error appears
从matplotlib导入pyplot作为plt
plt.ion()
plt.绘图(范围(10))
#窗口没有显示任何挂起,我最后键入+c,然后出现错误
您能发布引起上述错误的代码吗?是的,添加了。。。虽然不确定它有多有用…通过Anaconda安装?没有。。通过apt-get
虽然在从apt-get
卸载后尝试通过pip进行安装,但也失败了。它报告的错误是键盘中断,这意味着您Ctr-c
'd程序。看起来它正在重建字体缓存,这可能需要一段时间。试着多一点耐心。