[Tkinter-discuss] Tkinter on OS X wont import

Michael O'Donnell michael.odonnell at uam.es
Sun Oct 4 08:55:11 CEST 2009


Hi Nessus,

  I had the same problem a while back and fixed it after some
messing around. Stupidly I did't write down my fix.

I seem to remember that I had to update some software
which was NOT python. Maybe XCode. Make sure
you have the most recent versions of XCODE.

Sorry I cannot help more definitively.

Mick

On Sat, Oct 3, 2009 at 7:00 AM, Nessuss <andwhay at gmail.com> wrote:
>
> Hi,
>
> I've been trying to work with some python programs that use Tkinter in them
> but when python tries to import the Tkinter package I get this error:
>
> <code>
> import Tkinter
>  File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk/Tkinter.py",
> line 38, in <module>
>    import _tkinter # If this fails your Python may not be configured for Tk
> ImportError:
> dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_tkinter.so,
> 2): Library not loaded: /opt/local/lib/libX11.6.dylib
>  Referenced from:
> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_tkinter.so
>  Reason: no suitable image found.  Did find:
>        /opt/local/lib/libX11.6.dylib: mach-o, but wrong architecture
> </code>
>
> I can't seem to figure out the problem, some time ago I installed using
> macports tcl and tk, everything was working then. But now it gives the above
> error. In between the time Tkinter was last working and now I did upgrade to
> Snow Leopard. If anyone can help me out here, that would be great.
> --
> View this message in context: http://www.nabble.com/Tkinter-on-OS-X-wont-import-tp25725811p25725811.html
> Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>


More information about the Tkinter-discuss mailing list