tkagg problem: no module named _tkagg

Hi,

I'm using darwinports to install matplotlib with the
tkagg backend on a Mac OS X Tiger 10.4.2.

I've come across a problem in that when I run the
simple_plot.py script (see below) from the matplotlib
screeenshots page, I get the following error:

"ImportError: No module named _tkagg". (for detailed
output see below).

Does any one have any insight?

Thanks, John

===Details===

I'm running the script as:

$python2.4 simple_plot.py

I've edited my .matplotlibrc to use the TkAgg backend.
I've tested python's ability to import Tkinter by:

import Tkinter
Tkinter._test().

I observe a small Click me window when I
runTkinter._test()

I've used darwinports to install:
  antigraingeometry 2.3_5 (active)
  freetype 2.1.9_1 (active)
  libpng 1.2.8_2+darwin_8 (active)
  py-dateutil 0.5_1 (active)
  py-matplotlib 0.82_0 (active)
  py-numarray 1.4.1_0+darwin_8 (active)
  py-numeric 24.0_0+darwin_8 (active)
  py-tkinter 2.4.1_0 (active)
  py-tz 2004d_1 (active)
  python24 2.4.1_6 (active)
  tcl 8.4.11_2 (active)
  tk 8.4.11_3 (active)
  zlib 1.2.3_0 (active)

Here is detailed the error message:

ยทยทยท

==============
Traceback (most recent call last):
  File "TestPlot.py", line 8, in ?
    from pylab import *
  File
"/opt/local/lib/python2.4/site-packages/pylab.py",
line 1, in ?
    from matplotlib.pylab import *
  File
"/opt/local/lib/python2.4/site-packages/matplotlib/pylab.py",
line 199, in ?
    import backends
  File
"/opt/local/lib/python2.4/site-packages/matplotlib/backends/__init__.py",
line 19, in ?
    globals(),locals(),[backend_name])
  File
"/opt/local/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py",
line 8, in ?
    import tkagg # Paint image to Tk
photo blitter extension
  File
"/opt/local/lib/python2.4/site-packages/matplotlib/backends/tkagg.py",
line 1, in ?
    import _tkagg
ImportError: No module named _tkagg

And finally here's simple_plot.py:

from pylab import *

t = arange(0.0, 2.0, 0.01)
s = sin(2*pi*t)
plot(t, s, linewidth=1.0)

xlabel('time (s)')
ylabel('voltage (mV)')
title('About as simple as it gets, folks')
grid(True)
show()

__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com