configuring 1.5.2c1 on Mac for Tkinter ?

Skip Montanaro skip at mojam.com
Mon Dec 27 23:28:28 EST 1999


    Allen> I'm new to Python.  I've just installed the Macintosh
    Allen> self-installing python distribution version 1.5.2c1.  Apparenlty,
    Allen> it is not pre-configured for Tkinter.  If I import Tkinter, I get
    Allen> an error, "No Module Named Tkinter".

Looks to me like sys.path is missing the lib-tk directory.  It was on my
Mac.  Try the equivalent of

    >>> import sys
    >>> sys.path.append("Macintosh HD:Applications:Python 1.5.2c1:Lib:lib-tk")

changing the "Macintosh HD:Applications:" part to correspond to your
installation. 

Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/
847-971-7098   | Python: Programming the way Guido indented...




More information about the Python-list mailing list