<br><br><div class="gmail_quote">On Sun, May 17, 2009 at 8:42 AM, Piet van Oostrum <span dir="ltr"><<a href="mailto:piet@cs.uu.nl">piet@cs.uu.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
>>>>> Edward Grefenstette <<a href="mailto:egrefen@gmail.com">egrefen@gmail.com</a>> (EG) wrote:<br>
<br>
>EG> Any attempt to do anything with Tkinter (save import) raises the<br>
>EG> following show-stopping error:<br>
<br>
>EG> "Traceback (most recent call last):<br>
>EG>   File "<stdin>", line 1, in <module><br>
>EG>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/<br>
>EG> python2.6/lib-tk/Tkinter.py", line 1645, in __init__<br>
>EG>     self._loadtk()<br>
>EG>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/<br>
>EG> python2.6/lib-tk/Tkinter.py", line 1659, in _loadtk<br>
>EG>     % (_tkinter.TK_VERSION, tk_version)<br>
>EG> RuntimeError: tk.h version (8.4) doesn't match libtk.a version (8.5)"<br>
<br>
>EG> As you can see, I'm running the vanilla install python on OS X 10.5.7.<br>
>EG> Does anyone know how I can fix this? Google searches have yielded<br>
>EG> results ranging from suggestions it has been fixed (not for me) to<br>
>EG> recommendations that the user rebuild python against a newer version<br>
>EG> of libtk (which I have no idea how to do).<br>
<br>
>EG> I would greatly appreciate any assistance the community can provide on<br>
>EG> the matter.<br>
<br>
Have you installed Tk version 8.5?<br>
<br>
If so, remove it. You might also install the latest 8.4 version.</blockquote><div><br>There were a couple bugs in the 2.6.0 installer that stopped Tkinter from working and this error message was given by one of them[1]. The python installer looked in /System/Library before /Library/, so it used the System Tk. The linker looks in /Library first so it found the user installed Tk and used that instead. You then get a version mismatch. Try reinstalling Python (use 2.6.2 if you're not already). That should get it to link with the proper Tk.<br>
<br>[1] <a href="http://bugs.python.org/issue4017">http://bugs.python.org/issue4017</a><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<font color="#888888">--<br>
Piet van Oostrum <<a href="mailto:piet@cs.uu.nl">piet@cs.uu.nl</a>><br>
URL: <a href="http://pietvanoostrum.com" target="_blank">http://pietvanoostrum.com</a> [PGP 8DAE142BE17999C4]<br>
Private email: <a href="mailto:piet@vanoostrum.org">piet@vanoostrum.org</a><br>
</font><div><div></div><div class="h5">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>