python3 matplotlib.pyplot_无法导入matplotlib.pyplot在python 3中

但在导入pyplot时,我遇到了一个无法解决的重要问题:>>> import matplotlib

>>> import matplotlib.pyplot as plt

Traceback (most recent call last):

File "", line 1, in

File "/usr/local/lib/python3.2/dist-packages/matplotlib-1.4.x-py3.2-linux-i686.egg/matplotlib/pyplot.py", line 98, in

_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()

File "/usr/local/lib/python3.2/dist-packages/matplotlib-1.4.x-py3.2-linux-i686.egg/matplotlib/backends/__init__.py", line 25, in pylab_setup

globals(),locals(),[backend_name])

File "/usr/local/lib/python3.2/dist-packages/matplotlib-1.4.x-py3.2-linux-i686.egg/matplotlib/backends/backend_gtk3agg.py", line 1, in

import cairo

ImportError: No module named cairo

在导入pyplot之前,我尝试过matplotlib.use('Agg')和matplotlib.use('GTK'),但它们没有什么不同。在

任何帮助都将不胜感激,谢谢。在

编辑:

这表明我拥有所有必需的依赖项。在

^{pr2}$

你可能感兴趣的:(python3)