This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Tkinter cannot find *64 bit* Tcl/Tk on Mac OS X
Type: behavior Stage: resolved
Components: macOS, Tkinter Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: keflavich, ned.deily, ronaldoussoren, wordtech
Priority: normal Keywords: patch

Created on 2009-07-08 15:05 by keflavich, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
setup-tk-archs.patch ronaldoussoren, 2009-09-06 21:03
Messages (6)
msg90269 - (view) Author: Adam Ginsburg (keflavich) Date: 2009-07-08 15:05
While it is possible to compile 64 bit python on Mac OS X, the default
tcl/tk is NOT 64 bit.  If you do install a 64 bit version of tcl/tk,
python still will not find it - lines 1503-1515 prevent it:

        if 'x86_64' in archs or 'ppc64' in archs:
            try:
                archs.remove('x86_64')
            except ValueError:
                pass
            try:
                archs.remove('ppc64')
            except ValueError:
                pass

            for a in archs:
                frameworks.append('-arch')
                frameworks.append(a)


I was able to successfully get 64 bit tkinter working by commenting out
these lines as suggested by Ned Deily.

Ronald Oussoren suggests:
"BTW. The correct fix would be to add a probe to setup.py that detects
if Tcl/Tk was build with 64-bit support or not."
msg90270 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-07-08 15:17
Adam: where can I download a 64-bit version of Tcl/Tk?
msg90271 - (view) Author: Adam Ginsburg (keflavich) Date: 2009-07-08 15:25
Sorry Ronald, I had misinterpreted your last message.

Look at these posts:
http://buffalothedestroyer.blogspot.com/2009/07/installing-64-bit-tcltk-on-mac-os-x.html
http://www.nabble.com/Error-compiling-tk-8.5.7-on-Mac-OS-X-10.5-td23790967.html

or try this script:
curl -O
'http://osdn.dl.sourceforge.net/sourceforge/tcl/t{cl,k}8.5.7-src.tar.gz'
for f in t*8.5.7*.gz; do tar zxf $f; done
cd tcl8.5.7/unix/
./configure --enable-framework --enable-64-bit
cd tk8.5.7/unix/
./configure --enable-framework --enable-64-bit
make -j 4 -C tcl8.5.7/unix
make -j 4 -C tk8.5.7/unix
sudo make install -C tcl8.5.7/unix
sudo make install -C tk8.5.7/unix
msg92306 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-09-06 12:14
I found an easier way to test with a 64-bit Tcl/Tk: run Snow Leopard ;-)
msg92333 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-09-06 21:03
The (untested) attached patch ("setup-tk-archs.patch") updates the code in 
setup.py to automaticly detect the architectures that are supported by the 
Tk framework and passes '-arch' flags to the compiler for the intersection 
of the configured architectures for Python and the architectures supported 
by Tk.framework.
msg92650 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-09-15 19:24
I just commited a fix for this, the patch is present in all 4 active 
branches (2.6, 2.7, 3.1, 3.2)
History
Date User Action Args
2022-04-11 14:56:50adminsetgithub: 50690
2009-09-15 19:24:05ronaldoussorensetstatus: open -> closed
type: crash -> behavior
messages: + msg92650

resolution: fixed
stage: resolved
2009-09-06 21:03:35ronaldoussorensetfiles: + setup-tk-archs.patch
keywords: + patch
messages: + msg92333
2009-09-06 12:14:46ronaldoussorensetmessages: + msg92306
2009-07-08 20:49:55wordtechsetnosy: + wordtech
2009-07-08 15:25:19keflavichsetassignee: ronaldoussoren
messages: + msg90271
components: + macOS
nosy: ronaldoussoren, ned.deily, keflavich
2009-07-08 15:17:01ronaldoussorensetmessages: + msg90270
2009-07-08 15:05:31keflavichcreate