[MacPorts] #41449: py-ipython: ipython notebook does not support inline plots (ImportError: No module named _backend_agg)

MacPorts noreply at macports.org
Tue Nov 19 13:23:39 PST 2013


#41449: py-ipython: ipython notebook does not support inline plots (ImportError: No
module named _backend_agg)
-----------------------+------------------------
 Reporter:  aronnax@…  |      Owner:  akitada@…
     Type:  defect     |     Status:  new
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:  2.2.1
 Keywords:             |       Port:  py-ipython
-----------------------+------------------------
 The IPython port (py27-ipython +notebook) does not support inline plots.

 Start up IPython with:

 {{{
 $ ipython notebook --pylab=inline
 }}}

 Then, enter and execute the following code cell:

 {{{
 from matplotlib import pyplot as plt
 import numpy as np
 plt.plot(np.arange(10), np.arange(10))
 plt.show()
 }}}

 One gets the following traceback:

 {{{
 ---------------------------------------------------------------------------
 ImportError                               Traceback (most recent call
 last)
 <ipython-input-3-1505639dfc55> in <module>()
 ----> 1 from matplotlib import pyplot as plt
       2 import numpy as np
       3 plt.plot(np.arange(10), np.arange(10))

 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/matplotlib/pyplot.py in <module>()
      96
      97 from matplotlib.backends import pylab_setup
 ---> 98 _backend_mod, new_figure_manager, draw_if_interactive, _show =
 pylab_setup()
      99
     100

 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/matplotlib/backends/__init__.pyc in pylab_setup()
      26     # imports. 0 means only perform absolute imports.
      27     backend_mod = __import__(backend_name,
 ---> 28                              globals(),locals(),[backend_name],0)
      29
      30     # Things we pull in from all backends

 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/IPython/kernel/zmq/pylab/backend_inline.py in <module>()
       8 # Third-party imports
       9 import matplotlib
 ---> 10 from matplotlib.backends.backend_agg import new_figure_manager,
 FigureCanvasAgg
      11 from matplotlib._pylab_helpers import Gcf
      12

 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/matplotlib/backends/backend_agg.py in <module>()
      36 from matplotlib.transforms import Bbox, BboxBase
      37
 ---> 38 from matplotlib.backends._backend_agg import RendererAgg as
 _RendererAgg
      39 from matplotlib import _png
      40

 ImportError: No module named _backend_agg
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/41449>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list