[IPython-dev] Problem with gtk/pylab (with SVN)

Fernando Perez Fernando.Perez at colorado.edu
Wed Jan 11 01:34:57 EST 2006


Prabhu Ramachandran wrote:
> Hi, 
> 
> I get this error when I use the GTKAgg backend and pylab.
> 
> $ ipython -pylab
> pygtk.require() must be called before importing gtk
> PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib backends
> 
> OTOH, this works:
> 
> $ ipython -gthread
> 
> Matplotlib version 0.82?  Is this a matplotlib bug?  BTW, things work
> fine with the WXAgg backend.  I just thought that if this was a bug in
> IPython that you should know.

Which version of pygtk are you running?  With reasonably recent pygtk (from 
fecora 3) and matplotlib, I don't see any of this:

In [1]: matplotlib.__version__
Out[1]: '0.83.2'

In [2]: import pygtk

In [3]: pygtk._get_available_versions()
Out[3]: {'2.0': '/usr/lib/python2.3/site-packages/gtk-2.0'}


I remember there used to be a require() call before, but at some point in the 
last 6 months it was removed, I believe in order to follow the conventions of 
more current pygtk.  I may have been wrong in that though, I know precious 
little about the GTK API (as evidenced by the thread with C. Moad an S. Moore 
on ipython-user).

Cheers,

f




More information about the IPython-dev mailing list