tkagg problem: no module named _tkagg


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 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


I'm running the script as:


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

import Tkinter

I observe a small Click me window when I

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 "", line 8, in ?
    from pylab import *
line 1, in ?
    from matplotlib.pylab import *
line 199, in ?
    import backends
line 19, in ?
line 8, in ?
    import tkagg # Paint image to Tk
photo blitter extension
line 1, in ?
    import _tkagg
ImportError: No module named _tkagg

And finally here's

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')

Yahoo! FareChase: Search multiple travel sites in one click.