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

Michael Lange klappnase at web.de
Fri Apr 23 10:21:16 CEST 2010


On Thu, 22 Apr 2010 06:33:22 -0700
Guido Carballo-Guerrero <charras at me.com> wrote:

> 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:
> http://pypi.python.org/pypi/pyttk
> 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__ _load_tile(master) 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
> 8.4000000000000004

I think that it is probably much easier to install the tile extension
for Tk-8.4 than upgrading Tcl/Tk and Python to Tk-8.5 . You can look
for tile packages here:
and once tile is installed you can use ttk just as if you had Tk-8.5 .

I hope this helps


More information about the Tkinter-discuss mailing list