[IPython-User] Ipython

Guillermo Rangel cubreto@gmail....
Thu Apr 4 14:58:01 CDT 2013


Ok.. so when I try from the notebook

%pylab inline

I get this:

---------------------------------------------------------------------------ImportError
                              Traceback (most recent call
last)<ipython-input-4-04f366164105> in <module>()----> 1
get_ipython().magic(u'pylab inline')      2       3
/Library/Python/2.7/site-packages/ipython-0.14.dev-py2.7.egg/IPython/core/interactiveshell.pyc
in magic(self, arg_s)   2168         magic_name, _, magic_arg_s =
arg_s.partition(' ')   2169         magic_name =
magic_name.lstrip(prefilter.ESC_MAGIC)-> 2170         return
self.run_line_magic(magic_name, magic_arg_s)   2171    2172
#-------------------------------------------------------------------------
/Library/Python/2.7/site-packages/ipython-0.14.dev-py2.7.egg/IPython/core/interactiveshell.pyc
in run_line_magic(self, magic_name, line)   2094
kwargs['local_ns'] = sys._getframe(stack_depth).f_locals   2095
     with self.builtin_trap:-> 2096                 result =
fn(*args,**kwargs)   2097             return result   2098
/Library/Python/2.7/site-packages/ipython-0.14.dev-py2.7.egg/IPython/core/magics/pylab.pyc
in pylab(self, parameter_s)
/Library/Python/2.7/site-packages/ipython-0.14.dev-py2.7.egg/IPython/core/magic.pyc
in <lambda>(f, *a, **k)    189     # but it's overkill for just that
one bit of state.    190     def magic_deco(arg):--> 191         call
= lambda f, *a, **k: f(*a, **k)    192     193         if
callable(arg):
/Library/Python/2.7/site-packages/ipython-0.14.dev-py2.7.egg/IPython/core/magics/pylab.pyc
in pylab(self, parameter_s)     86             import_all_status =
True     87 ---> 88         self.shell.enable_pylab(parameter_s,
import_all=import_all_status, welcome_message=True)
/Library/Python/2.7/site-packages/ipython-0.14.dev-py2.7.egg/IPython/core/interactiveshell.pyc
in enable_pylab(self, gui, import_all, welcome_message)   2816
ns = {}   2817         try:-> 2818             gui =
pylab_activate(ns, gui, import_all, self,
welcome_message=welcome_message)   2819         except KeyError:
2820             error("Backend %r not supported" % gui)
/Library/Python/2.7/site-packages/ipython-0.14.dev-py2.7.egg/IPython/core/pylabtools.pyc
in pylab_activate(user_ns, gui, import_all, shell, welcome_message)
357                     ' Using %s instead.' % (gui,
pylab_gui_select))    358             gui, backend =
find_gui_and_backend(pylab_gui_select)--> 359
activate_matplotlib(backend)    360     import_pylab(user_ns,
import_all)    361     if shell is not None:
/Library/Python/2.7/site-packages/ipython-0.14.dev-py2.7.egg/IPython/core/pylabtools.pyc
in activate_matplotlib(backend)    223
matplotlib.rcParams['backend'] = backend    224 --> 225     import
matplotlib.pyplot    226     matplotlib.pyplot.switch_backend(backend)
   227
/Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/pyplot.py
in <module>()     24 from matplotlib.cbook import dedent, silent_list,
is_string_like, is_numlike     25 from matplotlib import docstring--->
26 from matplotlib.figure import Figure, figaspect     27 from
matplotlib.backend_bases import FigureCanvasBase     28 from
matplotlib.image import imread as _imread
/Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/figure.py
in <module>()     30      31 from matplotlib import _image---> 32 from
matplotlib.image import FigureImage     33      34 import
matplotlib.colorbar as cbar
/Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/image.py
in <module>()     20 # For clarity, names from _image are given
explicitly in this module:     21 import matplotlib._image as
_image---> 22 import matplotlib._png as _png     23      24 # For user
convenience, the names from _image are also imported into
ImportError: dlopen(/Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/_png.so,
2): Symbol not found: _png_create_info_struct
  Referenced from:
/Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/_png.so
  Expected in: flat namespace
 in /Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/_png.so


####################################################################################################################################################################


And when I try running a script invoking matplotlib I get the following error:


Traceback (most recent call last):
  File "plot.py", line 1, in <module>
    import matplotlib.pyplot as plt
  File "/Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/pyplot.py",
line 26, in <module>
    from matplotlib.figure import Figure, figaspect
  File "/Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/figure.py",
line 32, in <module>
    from matplotlib.image import FigureImage
  File "/Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/image.py",
line 22, in <module>
    import matplotlib._png as _png
ImportError: dlopen(/Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/_png.so,
2): Symbol not found: _png_create_info_struct
  Referenced from:
/Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/_png.so
  Expected in: flat namespace
 in /Library/Python/2.7/site-packages/matplotlib-1.2.1-py2.7-macosx-10.8-intel.egg/matplotlib/_png.so


####################################################################################################################################################################



This all started when I decided to easy_install -U matplotlib.

Thank you Guillermo



On Thu, Apr 4, 2013 at 12:18 PM, Paul Ivanov <pi@berkeley.edu> wrote:

> Guillermo Rangel, on 2013-04-04 11:11,  wrote:
> > Hi Paul
> >
> > For some reason I was playing with NetworkX and I noticed I was getting a
> > matplotlib problem about invalidate something I can't recall. I decided
> to
> > easy_install -U matplotlib and my life completely change. I can't get any
> > plots out of matplotlib now, actually when I start ipython notebook
> --pylab
> > inline I get the gollowing message
> >
> > [IPKernelApp] GUI event loop or pylab initialization failed
> >
> > Also I tried to use the pylab magic and I get the same problem.
> >
> > I can't plot now. I've noticed this has happened before. I tried updating
> > scipy as well to no avail. Could you please advice?
>
> can you start the ipython notebook without any flags, and in a
> new notebook just do %pylab inline, and provide the full
> traceback?
>
> Also, did you verify that matplotlib actually still works (can
> you still get plots using just plain python, for example)
>
> I'm forwarding this conversation to the IPython user list, so
> that someone else could pitch in with ideas, and can find
> whatever workaround we find for this via a search engine at a
> later time.
>
> --
> Paul Ivanov
> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130404/bdfdf4fa/attachment-0001.html 


More information about the IPython-User mailing list