[Pythonmac-SIG] Stranger in a Strange Land

Jason Van Anden jason at smileproject.com
Mon Apr 5 10:21:01 EDT 2004


Confession:
-----------------
I am a very experienced Windows developer who is dipping his toes into  
the water outside of Microsoft's programming IDE's.

System:
-----------
I have both a Linux PC and a Mac with OS 10.3, and a desire to create  
apps with a GUI using Python.

Problem:
------------
When I went to run my first Python app using Tkinter on the Mac from  
the terminal window, I got the following message:

Error Message:
---------------------
Traceback (most recent call last):
   File "tut1.py", line 3, in ?
     from Tkinter import *
   File  
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
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

Here is the code:
-----------------------
# File: tut1.py

from Tkinter import *

root = Tk()

w = Label(root, text="Hello World!")
w.pack

root.mainloop()



The info I find online when I Google for this is sketchy at best, and  
at worst filled with all sorts of intimidating jargon.

I would greatly appreciate some help sorting this out.

J




More information about the Pythonmac-SIG mailing list