[Tutor] IDLE/tk in 10.6

Luke Thomas Mergner lmergner at gmail.com
Fri Jul 15 21:14:09 CEST 2011


Hi,

I am not a professional programmer, but just trying to learn.

I'm running Mac 10.6 Snow Leopard.  I used MacPorts to install python26, python27, and python3.  My python interpreter loads 2.7.2 after I ran the python_select command, which is added via MacPorts I think.  

I'd like to try IDLE but there appears to be a known bug with 10.6's version of ActiveTCL.  I've installed a newer version 8.5 via their website, but this has not fixed the problem. The module tkinter is still unable to load.  Since both python and activeTCL are installed as "Frameworks" on my mac, I wonder if I need to tell python27 that there is another Tkinter installed elsewhere.  Can anyone give me some advice?

>>> import Tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 39, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

Luke Mergner
lmergner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110715/5d74ecf0/attachment.html>


More information about the Tutor mailing list