Problems with IPython and interactive mode (OS X, darwinports)

Hi.

I just installed ipython and matplotlib on OS X 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. Darwinports installs everything into /opt/local

~ $ python
Python 2.4.2 (#1, Mar 31 2006, 13:50:42)
[GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> 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
/Users/michael/.ipython
/opt/local/lib/python2.4/site-packages/IPython/Extensions

Cheers,
Mike