problems with libtk 8.5
I installed the py25-tkinter port which got me tk 8.5. Unfortunately, when I run a program which uses it I get an exception from Python (/opt/local/bin/python2.5 in this case): Traceback (most recent call last): File "/Users/skip/src/leo-4.4.6-final/src/leoPlugins.py", line 222, in loadOnePlugin init_result = result.init() File "/Users/skip/src/leo-4.4.6-final/plugins/plugins_menu.py", line 212, in init g.app.createTkGui(__file__) File "/Users/skip/src/leo-4.4.6-final/src/leoApp.py", line 254, in createTkGui g.app.root = g.app.gui.createRootWindow() File "/Users/skip/src/leo-4.4.6-final/src/leoTkinterGui.py", line 89, in createRootWindow self.root = root = Tk.Tk() File "/opt/local/lib/python2.5/lib-tk/Tkinter.py", line 1638, in __init__ self._loadtk() File "/opt/local/lib/python2.5/lib-tk/Tkinter.py", line 1658, in _loadtk % (_tkinter.TK_VERSION, tk_version) RuntimeError: tk.h version (8.5) doesn't match libtk.a version (8.4) Poking around my system I found tk 8.4 in /usr/lib and /System/Library/Frameworks/Tkc.framework: If I run Python interactively I can import Tkinter: % /opt/local/bin/python2.5 Python 2.5.1 (r251:54863, Jan 1 2008, 13:29:09) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "/Users/skip/.python.py", line 21, in <module> from save_session import mark, save, load File "/Users/skip/misc/python/save_session.py", line 21, in <module> raise ImportError("session save/restore requires readline module") ImportError: session save/restore requires readline module >>> import Tkinter >>> import _tkinter >>> _tkinter.__file__ '/opt/local/lib/python2.5/site-packages/_tkinter.so' and that version of _tkinter.so is in fact not linked to the MacPorts version: % otool -L /opt/local/lib/python2.5/site-packages/_tkinter.so /opt/local/lib/python2.5/site-packages/_tkinter.so: /System/Library/Frameworks/Tcl.framework/Versions/8.4/Tcl (compatibility version 8.4.0, current version 8.4.0) /System/Library/Frameworks/Tk.framework/Versions/8.4/Tk (compatibility version 8.4.0, current version 8.4.0) /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 93.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.10) Have I somehow muffed something? Thanks, -- Skip Montanaro - skip@pobox.com - http://www.webfast.com/~skip/ The major difference between Democrats and Republicans is that Republicans don't know that Randy Newman's lyrics are full of sarcasm.
On Jan 29, 2008 8:02 PM, <skip@pobox.com> wrote:
I installed the py25-tkinter port which got me tk 8.5. Unfortunately, when I run a program which uses it I get an exception from Python (/opt/local/bin/python2.5 in this case):
Traceback (most recent call last): File "/Users/skip/src/leo-4.4.6-final/src/leoPlugins.py", line 222, in loadOnePlugin init_result = result.init() File "/Users/skip/src/leo-4.4.6-final/plugins/plugins_menu.py", line 212, in init g.app.createTkGui(__file__) File "/Users/skip/src/leo-4.4.6-final/src/leoApp.py", line 254, in createTkGui g.app.root = g.app.gui.createRootWindow() File "/Users/skip/src/leo-4.4.6-final/src/leoTkinterGui.py", line 89, in createRootWindow self.root = root = Tk.Tk() File "/opt/local/lib/python2.5/lib-tk/Tkinter.py", line 1638, in __init__ self._loadtk() File "/opt/local/lib/python2.5/lib-tk/Tkinter.py", line 1658, in _loadtk % (_tkinter.TK_VERSION, tk_version) RuntimeError: tk.h version (8.5) doesn't match libtk.a version (8.4)
This was fixed in r33426 [1], do a port selfupdate and try again. Cheers Adam [1] http://trac.macosforge.org/projects/macports/changeset/33426
>> RuntimeError: tk.h version (8.5) doesn't match libtk.a version (8.4) Adam> This was fixed in r33426 [1], do a port selfupdate and try again. I just selfupdated a couple days ago. Selfupdate tells me: % sudo port selfupdate MacPorts base version 1.600 installed Downloaded MacPorts base version 1.600 The MacPorts installation is not outdated and so was not updated selfupdate done! Do I need to clean some ports and reinstall? Tcl? Tk? Thx, Skip
Adam> what does "port outdated" say? py25-tkinter-2.5.1_1 is the version Adam> with the fix for tcl-8.5 Ah, okay... I also upgraded outdated ports a couple days ago, but it shows py25-tkinter as being out-of-date, so I'm upgrading outdated ports again. Thanks, Skip
participants (2)
-
Adam Mercer
-
skip@pobox.com