[Tkinter-discuss] How can I tell Tkinter where to look for Tcl/Tk?

Guido Carballo-Guerrero charras at me.com
Thu Apr 22 15:33:22 CEST 2010

Hello, I have a Mac, running OS X 10.6.3, and have Python 2.6.4 install. I already install ttk, got it from:


But when I try to use ttk, it with me the following error:

Traceback (most recent call last):
  File "/Users/Charras/Documents/CS/Python/programs/Tkinter/ttk/prueba1.py", line 6, in <module>
    style = ttk.Style()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ttk.py", line 392, in __init__
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ttk.py", line 60, in _load_tile
    master.tk.eval('package require tile') # TclError may be raised here
TclError: can't find package tile

I read somewhere that this mean that I had an old Tcl/Tk version, and I check it, and yes, that was the case:

>>> import Tkinter as Tkt
>>> Tkt.TkVersion

So I download and install version 8.5 from activestate.com. Now I have TCL/TK 8.5 install in my machine, inside of  "/Library/Frameworks/Tcl.framework/Versions/8.5". and "/Library/Frameworks/Tk.framework/Versions/8.5"., but I guess that if even after doing this, Tkinter still sees 8.4 is 'cause I need to tell it to go and load this new version and read from there, but I don't know how to do that.

Can somebody guide me on how to do it?



More information about the Tkinter-discuss mailing list