Message74893
There are two symptoms here, each caused by a different bug.
Neither is specific to IDLE; they have to do with Tkinter recognizing
the correct Tcl/Tk installation at build time and run time.
Bug 1: The Python 2.6 binary installer appears (judging from the error
message) to have been built against a Tcl installation in
/Library/Frameworks/Tcl.framework. Mac OS X (10.4.11 and I assume
Leopard as well) comes with Tcl/Tk, installed in
/System/Library/Frameworks, but there will be no
/Library/Frameworks/Tcl.framework unless you install Tcl/Tk on your own
(but read on before doing so).
Symptom 1: Hence, the error about not being able to find
/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl. This symptom should
not manifest if either a) you install Tcl/Tk 8.5 on your own, or b) you
build Python from the source (so that it finds the pre-installed Tcl in
/System/Library).
Bug 2: The Python source distribution (both 2.5.2 and 2.6; I have not
checked earlier versions) searches for Tcl and Tk in the wrong order, as
pointed out in the comp.lang.python post referenced in msg74440 and
msg74544.
In Mac OS X's standard search order for frameworks, /Library/Frameworks
comes before /System/Library/Frameworks (see the ld and dyld man pages:
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/
ld.1.html and
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/
dyld.1.html), whereas the setup.py script in the Python source
distribution tries /System/Library/Frameworks/Tcl.framework before
/Library/Frameworks/Tcl.framework (and same for Tk.framework).
Symptom 2: This causes a problem _only_ when you have a separately
installed version of Tcl (e.g. 8.5).
Python's setup.py script finds the Tk installation in
/System/Library/Frameworks/Tk.framework (version 8.4) and uses its
headers, whereas the linker (being part of Mac OS X) chooses the Tk
dynamic library in /Library/Frameworks/Tk.framework (version 8.5 if
that's what you installed). (I suspect the linker records the Tcl and Tk
installations (or versions) found at build time.) Hence the error
message about Tk version mismatch.
If you are affected by both of these bugs, Tkinter will not work whether
or not you install Tcl 8.5 in /Library/Frameworks.
I believe the setup.py script ought to be corrected (as per the post
cited in msg74544). I do not know of an easy fix for existing Python
installations that are affected by this, other than rebuilding Python. |
|
Date |
User |
Action |
Args |
2008-10-17 03:30:15 | mtsch | set | recipients:
+ mtsch, tebeka, kjohnson, benjamin.peterson, naufraghi, fzero, ohmi, tommusic, njw23, leoofborg, Watchman, donbraffitt |
2008-10-17 03:30:14 | mtsch | set | messageid: <1224214214.95.0.0536080380417.issue4017@psf.upfronthosting.co.za> |
2008-10-17 03:30:13 | mtsch | link | issue4017 messages |
2008-10-17 03:30:08 | mtsch | create | |
|