New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tkinter cannot find Tcl/Tk on Mac OS X #48267
Comments
I've just installed Python 2.6 on Mac OS X 10.5.5 and IDLE won't start. 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 |
Installing tcl 8.5 from activestate gets rid of that error but then the 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) |
I suspect this is my fault for linking the libraries incorrectly as I |
FWIW, installing MacPorts tcl and tk (8.5.4) didn't help |
I asked a slightly different question (related to tkinter in general on Worth a try? |
Hello. First time here, beginner at Python. I have verified that the ** ** In setup.py, I simply put /Library/Frameworks/ first as outlined above, -Leo Marihart |
I have the same error as in msg74221 Some workaround not involving a full rebuild? |
Aloha! I followed the suggestions in msg74544 by Leo M and can confirm that *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% |
I have the same problem with Python 2.6 IDLE on Mac OS X 10.4.11. |
If you look in /Library/Frameworks/Tcl.framework/Versions/, what's |
ITEC-MBP-15087:~ dbraffitt$ cd /Library/Frameworks/Tcl.framework/
|
Do you know if you have tcl/tk somewhere else? Otherwise, I think you |
There are two symptoms here, each caused by a different bug. Bug 1: The Python 2.6 binary installer appears (judging from the error Symptom 1: Hence, the error about not being able to find Bug 2: The Python source distribution (both 2.5.2 and 2.6; I have not In Mac OS X's standard search order for frameworks, /Library/Frameworks Symptom 2: This causes a problem _only_ when you have a separately If you are affected by both of these bugs, Tkinter will not work whether I believe the setup.py script ought to be corrected (as per the post |
Per instructions in the helpful post outlining the Library search order, IDLE appears to be working well so far. Also the Python interactive Following is the crash report shown by the Apple Crash Reporter. -------------------------- CRASH REPORT ---------------------------- Date/Time: 2008-10-19 20:11:18.643 +0200 Exception Type: EXC_BAD_ACCESS (SIGBUS) Thread 0 Crashed: Thread 0 crashed with X86 Thread State (32-bit): Binary Images: ------------------------------------------------------------------- I have MacPorts installed and also an old Fink installation. Could this If someone could help I'd be most grateful. André |
Assigning to Ronald. I all that needs to be done, it have the installers |
same here |
Just a quick comment from the Python training universe--this bug makes it |
Now that Python 2.6.1 is out, can we expect a new OS X installer built |
I've uploaded a .dmg for 2.6.1 to |
I downloaded the newly built 2.6.1 dmg and can confirm that, at least (1) import Tkinter works. It looks like we have a winner, good job Benjamin! |
I installed the 2.6.1 .dmg on Mac OS X 10.5.5, and IDLE once again works
|
2008/12/18 Benjamin Peterson <report@bugs.python.org>:
Just to confirm, I have installed the package in OS X 10.4.11, and Many Thanks. |
Installed on 10.5.6, IDLE ran correctly. |
Ok. Thanks for testing! I've added the installers to the website. |
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 I have installed 64-bit Tcl/Tk: Everything that _tkinter.so links to appears to be 64-bit capable: But somehow _tkinter.so doesn't have x86_64 support: How can I make tkinter work with 64 bit Tcl/Tk? |
@keflavich: To include 64-bit support for Tcl/Tk on OSX, you'll need to |
keflavich: Please open a new issue for the problem you are running in, it 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 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: