tcl/tk version confusion with tkinter in Python 2.6, on OS X

njwilson23 at gmail.com njwilson23 at gmail.com
Mon Oct 6 16:48:43 EDT 2008


I'm having trouble with tkinter on a new installation of Python (2.6),
built with the framework option from source that was downloaded from
python.org. I'm running OS 10.4 on a PowerPC G4.

The problem first arose when I tried to run matplotlib - it couldn't
find tcl/tk because it was searching for 8.5, and I had 8.4. I found
and built tcl/tk 8.5, which led to a new error, reproduced below:

Traceback (most recent call last):
  File "brownian2.py", line 55, in <module>
    main()
  File "brownian2.py", line 41, in main
    root = Tk()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/lib-tk/Tkinter.py", line 1645, in __init__
    self._loadtk()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/lib-tk/Tkinter.py", line 1659, in _loadtk
    % (_tkinter.TK_VERSION, tk_version)
RuntimeError: tk.h version (8.4) doesn't match libtk.a version (8.5)

I'm a bit of a neophyte - can anyone tell me how to go about fixing
this? I've found some information by searching the list and Google,
but no helpful solutions.

Thanks,
Nat



More information about the Python-list mailing list