Created on 2008-10-02 15:16 by fzero, last changed 2009-07-08 06:15 by ronaldoussoren. This issue is now closed.
|msg74166 - (view)||Author: Fabio FZero (fzero)||Date: 2008-10-02 15:16|
I've just installed Python 2.6 on Mac OS X 10.5.5 and IDLE won't start. IDLE 2.5 still works fine. Here's the traceback: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/Current/bin/idle", line 3, in <module> from idlelib.PyShell import main File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/PyShell.py", line 14, in <module> import macosxSupport File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/macosxSupport.py", line 6, in <module> import Tkinter File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py", line 39, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so Reason: image not found
|msg74221 - (view)||Author: Ohmi (ohmi)||Date: 2008-10-03 00:57|
Installing tcl 8.5 from activestate gets rid of that error but then the following happens on my pretty clean iMac: Traceback (most recent call last): File "/usr/local/bin/idle", line 5, in <module> main() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib /PyShell.py", line 1382, in main root = Tk(className="Idle") File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib- tk/Tkinter.py", line 1645, in __init__ self._loadtk() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib- tk/Tkinter.py", line 1659, in _loadtk % (_tkinter.TK_VERSION, tk_version) RuntimeError: tk.h version (8.4) doesn't match libtk.a version (8.5)
|msg74341 - (view)||Author: Benjamin Peterson (benjamin.peterson) *||Date: 2008-10-05 12:40|
I suspect this is my fault for linking the libraries incorrectly as I built the installer.
|msg74342 - (view)||Author: Miki Tebeka (tebeka) *||Date: 2008-10-05 12:46|
FWIW, installing MacPorts tcl and tk (8.5.4) didn't help
|msg74440 - (view)||Author: Nat (njw23)||Date: 2008-10-07 12:18|
I asked a slightly different question (related to tkinter in general on OS 10.4.11), but the symptoms were remarkably similar - perhaps the solution is as well? http://groups.google.com/group/comp.lang.python/browse_thread/thread/1114b05318a5507e/a7c269e62b4f0434#a7c269e62b4f0434 Worth a try?
|msg74544 - (view)||Author: Leo M (leoofborg)||Date: 2008-10-08 19:25|
Hello. First time here, beginner at Python. I have verified that the Google tip link in the previous to fix IDLE works for me. Post in question: ** [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. ** In setup.py, I simply put /Library/Frameworks/ first as outlined above, and then did a config-make-install of the Framework version of Python. IDLE now does not silently fail now, but runs as 'expected'. -Leo Marihart Python Newb, Somewhat more experienced shell guy
|msg74663 - (view)||Author: Matteo Bertini (naufraghi)||Date: 2008-10-12 11:02|
I have the same error as in msg74221 RuntimeError: tk.h version (8.4) doesn't match libtk.a version (8.5) Some workaround not involving a full rebuild?
|msg74722 - (view)||Author: Joachim Strombergson (Watchman)||Date: 2008-10-14 07:09|
Aloha! I followed the suggestions in msg74544 by Leo M and can confirm that IDLE starts as OK. *BUT* when I try to import Tkinter I get: >>> import Tkinter Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py", line 39, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so It seems the fix is not 100%
|msg74764 - (view)||Author: Don Braffitt (donbraffitt)||Date: 2008-10-14 18:47|
>I've just installed Python 2.6 on Mac OS X 10.5.5 and IDLE won't start. I have the same problem with Python 2.6 IDLE on Mac OS X 10.4.11.
|msg74765 - (view)||Author: Nat (njw23)||Date: 2008-10-14 18:55|
If you look in /Library/Frameworks/Tcl.framework/Versions/, what's there? How about in /Library/Frameworks/Tcl.framework/Versions/8.5/?
|msg74838 - (view)||Author: Don Braffitt (donbraffitt)||Date: 2008-10-16 16:59|
ITEC-MBP-15087:~ dbraffitt$ cd /Library/Frameworks/Tcl.framework/ -bash: cd: /Library/Frameworks/Tcl.framework/: No such file or directory - Don
|msg74840 - (view)||Author: Nat (njw23)||Date: 2008-10-16 17:23|
Do you know if you have tcl/tk somewhere else? Otherwise, I think you need to install it. You can get the source from Sourceforge, or I think you can get it from Activestate. http://tcl.sourceforge.net/
|msg74893 - (view)||Author: Mark Tsuchida (mtsch)||Date: 2008-10-17 03:30|
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.
|msg74981 - (view)||Author: Andre Berg (andreb)||Date: 2008-10-19 18:25|
Per instructions in the helpful post outlining the Library search order, I downloaded and installed AquaTk 8.5.4, then I downloaded Python-2.6.tar.gz source, ran ./configure --enable-framework, sudo make build, sudo make install. IDLE appears to be working well so far. Also the Python interactive interpreter appears to be working. Except that whenever I do an import <module> I get a Bus Error and the Python interpreter crashes. This appears randomly, but no less than the second import <module> statement I type one after the other. It is interesting to note that the interactive prompt in the IDLE does not have this problem. Only the command line (e.g. Terminal) interactive interpreter does, as well as IPython. Following is the crash report shown by the Apple Crash Reporter. Hopefully someone can make sense of it, as I can't (I am not a hardcore programmer, unfortunately.) -------------------------- CRASH REPORT ---------------------------- Parent Process: bash  Date/Time: 2008-10-19 20:11:18.643 +0200 OS Version: Mac OS X 10.5.5 (9F33) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000 Crashed Thread: 0 Thread 0 Crashed: 0 readline.so 0x000bba3c call_readline + 732 1 org.python.python 0x001d43ae PyOS_Readline + 254 2 org.python.python 0x001d5ba0 tok_nextc + 64 3 org.python.python 0x001d6425 PyTokenizer_Get + 101 4 org.python.python 0x001d0da0 parsetok + 256 5 org.python.python 0x002b0942 PyRun_InteractiveOneFlags + 306 6 org.python.python 0x002b0c83 PyRun_InteractiveLoopFlags + 99 7 org.python.python 0x002b1549 PyRun_AnyFileExFlags + 185 8 org.python.python 0x002c2506 Py_Main + 3046 9 org.python.python.app 0x00001f7b 0x1000 + 3963 10 org.python.python.app 0x00001ea9 0x1000 + 3753 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x000bb76b ecx: 0xbfffeff8 edx: 0x00417ea0 edi: 0x004291d0 esi: 0x004256d0 ebp: 0xbffff108 esp: 0xbffff020 ss: 0x0000001f efl: 0x00010246 eip: 0x000bba3c cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0x00000000 Binary Images: 0x1000 - 0x1ff5 +org.python.python.app 2.6 (2.6) <c2196bdf25a197afe6742856fe1a0d2c> /Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python 0x48000 - 0x48ffc +_functools.so ??? (???) <29c6937481e9eeb3b02765cca7ccf287> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_functools.so 0xba000 - 0xbbff1 +readline.so ??? (???) <0a2a766193b43567110e66bf2231dafa> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/readline.so 0xc1000 - 0xd7fea libedit.2.dylib ??? (???) <be5a6f391887bb96bdeeafd443cf19fb> /usr/lib/libedit.2.dylib 0xe2000 - 0xe5ff3 +_collections.so ??? (???) <b8e1e58e2741f43942d616980ceff543> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_collections.so 0xeb000 - 0xeefff +operator.so ??? (???) <fc3afb280fb4a4ac8d2ec1a2fd8c67c6> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/operator.so 0xf5000 - 0xf6fff +time.so ??? (???) <fbe4f462c631fcfffa042ab980f367aa> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/time.so 0x1cf000 - 0x2f5fe3 +org.python.python 2.6.0, (c) 2004-2008 Python Software Foundation. (2.6.0) <44f73bce7c729a42509bd1761feecc32> /Library/Frameworks/Python.framework/Versions/2.6/Python 0x8fe00000 - 0x8fe2da53 dyld 96.2 (???) <7af47d3b00b2268947563c7fa8c59a07> /usr/lib/dyld 0x92778000 - 0x9277ffe9 libgcc_s.1.dylib ??? (???) <a9ab135a5f81f6e345527df87f51bfc9> /usr/lib/libgcc_s.1.dylib 0x94583000 - 0x94587fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x94a36000 - 0x94b96ff3 libSystem.B.dylib ??? (???) <a12f397abf2285077b89bd726bff5b18> /usr/lib/libSystem.B.dylib 0x95526000 - 0x95555ff7 libncurses.5.4.dylib ??? (???) <3b2ac2ca8190942b6b81d2a7012ea859> /usr/lib/libncurses.5.4.dylib 0xffff0000 - 0xffff1780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib ------------------------------------------------------------------- I have MacPorts installed and also an old Fink installation. Could this be causing it? I also looked through the README troubleshooting section, and I did not change the default installation location for the framework as suggested in the README. If someone could help I'd be most grateful. André
|msg75148 - (view)||Author: Benjamin Peterson (benjamin.peterson) *||Date: 2008-10-23 20:24|
Assigning to Ronald. I all that needs to be done, it have the installers built correctly.
|msg76047 - (view)||Author: TJ Usiyan (TJ)||Date: 2008-11-19 13:43|
|msg76101 - (view)||Author: David M. Beazley (beazley)||Date: 2008-11-20 13:25|
Just a quick comment from the Python training universe--this bug makes it impossible to use Python 2.6 in any kind of Python teaching environment where IDLE tends to be used a lot. I'm having to tell students to stick with Python-2.5.2.
|msg77016 - (view)||Author: Muhammad Alkarouri (malkarouri)||Date: 2008-12-05 13:50|
Now that Python 2.6.1 is out, can we expect a new OS X installer built correctly? I think this is pretty important..
|msg78034 - (view)||Author: Benjamin Peterson (benjamin.peterson) *||Date: 2008-12-18 17:40|
I've uploaded a .dmg for 2.6.1 to http://www.python.org/ftp/python/2.6.1/. Could you please test it?
|msg78036 - (view)||Author: Joachim Strombergson (Watchman)||Date: 2008-12-18 18:08|
I downloaded the newly built 2.6.1 dmg and can confirm that, at least for me: (1) import Tkinter works. (2) Starting IDLE works. It looks like we have a winner, good job Benjamin!
|msg78051 - (view)||Author: Don Braffitt (donbraffitt)||Date: 2008-12-19 01:19|
>I've uploaded a .dmg for 2.6.1 to >http://www.python.org/ftp/python/2.6.1/. Could you please test it? I installed the 2.6.1 .dmg on Mac OS X 10.5.5, and IDLE once again works fine. - Don
|msg78068 - (view)||Author: Muhammad Alkarouri (malkarouri)||Date: 2008-12-19 18:57|
2008/12/18 Benjamin Peterson <email@example.com>: > > Benjamin Peterson <firstname.lastname@example.org> added the comment: > > I've uploaded a .dmg for 2.6.1 to > http://www.python.org/ftp/python/2.6.1/. Could you please test it? > Just to confirm, I have installed the package in OS X 10.4.11, and Tkinter and Idle work fine. Many Thanks.
|msg78077 - (view)||Author: Ohmi (ohmi)||Date: 2008-12-19 23:38|
Installed on 10.5.6, IDLE ran correctly. Nicely done.
|msg78129 - (view)||Author: Benjamin Peterson (benjamin.peterson) *||Date: 2008-12-20 22:06|
Ok. Thanks for testing! I've added the installers to the website.
|msg90091 - (view)||Author: Adam Ginsburg (keflavich)||Date: 2009-07-03 23:43|
Although this is an old & closed error, I'm still running in to it. I am trying to compile & install 64 bit python with Tk/Tcl support on Mac OS X 10.5.7. I have installed 64-bit Tcl/Tk: $ file /Library/Frameworks/Tk.framework/Versions/8.5/Tk /Library/Frameworks/Tk.framework/Versions/8.5/Tk: Mach-O universal binary with 3 architectures /Library/Frameworks/Tk.framework/Versions/8.5/Tk (for architecture ppc7400): Mach-O dynamically linked shared library ppc /Library/Frameworks/Tk.framework/Versions/8.5/Tk (for architecture i386): Mach-O dynamically linked shared library i386 /Library/Frameworks/Tk.framework/Versions/8.5/Tk (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 $ file /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl: Mach-O universal binary with 3 architectures /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (for architecture ppc7400): Mach-O dynamically linked shared library ppc /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (for architecture i386): Mach-O dynamically linked shared library i386 /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 Everything that _tkinter.so links to appears to be 64-bit capable: $ otool -L /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so: /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility version 8.5.0, current version 8.5.7) /Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility version 8.5.0, current version 8.5.7) /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0) But somehow _tkinter.so doesn't have x86_64 support: $ file /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so: Mach-O universal binary with 2 architectures /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so (for architecture i386): Mach-O bundle i386 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so (for architecture ppc7400): Mach-O bundle ppc How can I make tkinter work with 64 bit Tcl/Tk?
|msg90249 - (view)||Author: Ned Deily (ned.deily) *||Date: 2009-07-08 02:31|
@keflavich: To include 64-bit support for Tcl/Tk on OSX, you'll need to modify python's setup.py file. Search down for "All existing framework builds of Tcl/Tk don't support 64-bit" around line 1500 in 2.6; there is explicit code there to prevent tkinter from attempting to link with x86_64 and ppc64 libraries.
|msg90251 - (view)||Author: Ronald Oussoren (ronaldoussoren) *||Date: 2009-07-08 06:15|
keflavich: Please open a new issue for the problem you are running in, it is a completely seperate issue than the one you appended your message to. Where can I download a 64-bit capable version of Tcl/Tk? 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.
|2009-07-08 06:15:40||ronaldoussoren||set||messages: + msg90251|
messages: + msg90249
messages: + msg90091
|2008-12-20 22:06:45||benjamin.peterson||set||status: open -> closed|
messages: + msg78129
beazley, reowen, ronaldoussoren, kjohnson, wordtech, benjamin.peterson, naufraghi, fzero, ohmi, tommusic, Watchman, donbraffitt, mtsch, andreb, TJ, malkarouri|
messages: + msg78077
|2008-12-19 22:01:50||leoofborg||set||nosy: - leoofborg|
|2008-12-19 21:53:42||tebeka||set||nosy: - tebeka|
|2008-12-19 18:57:41||malkarouri||set||messages: + msg78068|
|2008-12-19 01:19:18||donbraffitt||set||messages: + msg78051|
|2008-12-18 18:08:59||Watchman||set||messages: + msg78036|
|2008-12-18 17:40:23||benjamin.peterson||set||messages: + msg78034|
messages: + msg77016
messages: + msg76101
messages: + msg76047
|2008-10-23 20:24:46||benjamin.peterson||set||assignee: ronaldoussoren|
messages: + msg75148
nosy: + ronaldoussoren
|2008-10-20 19:17:55||reowen||set||nosy: + reowen|
messages: + msg74981
versions: - Python 2.5
|2008-10-17 23:39:42||njw23||set||nosy: - njw23|
|2008-10-17 23:38:54||wordtech||set||nosy: + wordtech|
title: IDLE 2.6 broken on OSX (Leopard) -> Tkinter cannot find Tcl/Tk on Mac OS X
messages: + msg74893
components: + Build, Installation, Macintosh, Tkinter, - IDLE
versions: + Python 2.5
|2008-10-16 17:23:56||njw23||set||messages: + msg74840|
|2008-10-16 16:59:43||donbraffitt||set||messages: + msg74838|
|2008-10-14 18:55:10||njw23||set||messages: + msg74765|
messages: + msg74764
messages: + msg74722
messages: + msg74663
messages: + msg74544
|2008-10-07 18:03:49||kjohnson||set||nosy: + kjohnson|
messages: + msg74440
|2008-10-05 12:46:44||tebeka||set||messages: + msg74342|
messages: + msg74341
|2008-10-05 10:11:09||tebeka||set||nosy: + tebeka|
|2008-10-03 17:52:27||tommusic||set||nosy: + tommusic|
messages: + msg74221