Python on Max osx and tkinter

George Trojan george.trojan at noaa.gov
Sat Dec 27 10:52:18 EST 2003


Ralf Wieseler wrote:
> Hello! I'm quite new to Python.
> 
> I wrote some little scripts using the "import from tkinter" Statemant 
> that work well on Windows and Linux. but if i try to execute them in my 
> Powerbook with Mac OSX 10.2.8 i get only Errors. I imorted the TKinter 
> Module with the Package Manager of MacPython 2.3 but it doesn't work.
> My Macphython has no idea of TKinter.
> Whats wrong?
> 
> Thanks for any help!
> 
> Greetz Ralf
> 
I have Mac OS X 10.3 (7B85). Tkinter that came with the OS does not work 
for me:

> trojan$ python
> Python 2.3 (#1, Sep 13 2003, 00:49:11) 
> [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import Tkinter
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   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

I am a newcomer to Mac, don't know whether this is a build issue (shared 
  library for _tkinter was not linked) or a configuration problem.
I guess I will have to build another version, after installing Tk and X11.

George




More information about the Python-list mailing list