[IPython-user] ipython -pylab startup error

Michael Broe mbroe at columbus.rr.com
Tue Apr 4 15:35:08 CDT 2006


Hi.

I just installed ipython and matplotlib via Darwinports, and both are  
working well. However, I am getting an error in the interaction  
between them:

$ 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

It seems odd since I do have a later version of pygtk. Here are (some  
of) my installed ports:

~ $ port installed
The following ports are currently installed:

   gtk2 @2.8.12_1+darwin_8 (active)
   py-gtk2 @2.8.4_0 (active)
   py-ipython @0.7.1.fix1_0 (active)
   py-matplotlib @0.82_0+gtk2 (active)   <-- note matplotlib is  
configured for gtk2

My backend is GTKAgg.

In addition, when I run matplotlib in interactive mode, by setting  
interactive: True in my matplotlib.rc file, it works, but the effects  
are one step behind. I.e. I can say:

plot([1, 2, 3])
			(the plotting window appears with nothing in it)
xlabel('foo')
			(the line appears)
ylabel('baz')
			(the xlabel appears)

etc.

Any ideas what might be going wrong?

In case it helps, here is my pythonpath:

In [2]: print '\n'.join(sys.path)

/opt/local/bin
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python24.zip
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/plat-darwin
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/plat-mac
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/plat-mac/lib-scriptpackages
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/lib-tk
/opt/local/lib/python2.4/lib-dynload
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages
/opt/local/lib/python2.4/site-packages
/opt/local/lib/python2.4/site-packages/Numeric
/opt/local/lib/python2.4/site-packages/gtk-2.0
/Users/michael/Library/Python/2.4/site-packages
/opt/local/lib/python2.4/site-packages
/opt/local/lib/python2.4/site-packages
/Users/michael/.ipython
/opt/local/lib/python2.4/site-packages/IPython/Extensions


Cheers,
Mike




More information about the IPython-user mailing list