In article <AANLkTik9cnFhXMzHycvL2iDid=8qK43=JP=y_q4uw...@mail.gmail.com>, "Michael O'Donnell" <michael.odonn...@uam.es> wrote: > A solution here (but not for beginners to programming) is > to compile python yourself, and tell the compile script > where to look for TCL/TK. > > A comment from somewhere else > and 2 years old or so. Hopefully things are still the same: > > -------------------- > [Kevin's post of 6.Oct, 02:58] > You can avoid this problem by building Python yourself and putting > /Library/Frameworks first on the search path for Tcl/Tk. Look in > setup.py in the source code, around line 1438 (in the > 'detect_tkinter_darwin' function), and either comment out > /System/Library or put it underneath /Library/Frameworks. This is what > the official build from Python.org should do--look first in > /Library/Frameworks and then fall back on /System/Library/Frameworks. > I'm not sure why it doesn't. > -------------------
There's no need to build it yourself. All recent (within the past two years at least) python.org installers are built this way, so that they will use the ActiveState Tcl/Tk 8.4 (or, with the 2.7 and 3.2 64-bit/32-bit 10.6 installers, 8.5) if it is available at runtime (in /Library/Frameworks) and, if not, fall back to the Apple-supplied versions in /System/Library/Frameworks/). You can check for yourself: $ otool -L $(python3.1 -c 'import _tkinter;print(_tkinter.__file__)') /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/lib-dynlo ad/_tkinter.so: /Library/Frameworks/Tcl.framework/Versions/8.4/Tcl (compatibility version 8.4.0, current version 8.4.19) /Library/Frameworks/Tk.framework/Versions/8.4/Tk (compatibility version 8.4.0, current version 8.4.19) /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 47.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.10) You should see /Library/Frameworks/Tcl... rather than /System/Library/... -- Ned Deily, n...@acm.org _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss