OS X and Tkinter

Mike Tuller python at discovercommunityed.com
Mon Mar 14 21:47:38 CET 2005

I recently purchased a book to learn python, and am at a part where I  
want to start working with GUIs. I have an OS X system, and am using  
the default python installed on the system. I have installed Tcl/Tk  
Aqua from http://tcltkaqua.sourceforge.net/.

When I run the file called gui.py that contains this:

from Tkinter import *
root = Tk()
root.title("Simple GUI")

I get this back:

python gui.py
Traceback (most recent call last):
   File "gui.py", line 1, in ?
     from Tkinter import *
python2.3/lib-tk/Tkinter.py", line 38, in ?
     import _tkinter # If this fails your Python may not be configured  
for Tk
ImportError: No module named _tkinter

I have looked everywhere on the net, and can't figure out how to  
configure python so that Tkinter will work with it. Any help would be  


More information about the Python-list mailing list