/lib-tk/Tkinter.py", for Tk/python2.7/lib-dynload/_tkinter.so, hon2.
Ned Deily
nad at acm.org
Sun Jul 31 14:49:08 EDT 2011
In article <201173191847usenet at terrranews.com>,
Joel Godin <joel.godin at gmail.com> wrote:
> Also happens with python3.1 and OSX 10.6.8
>
> import tkinter #yields:
>
>
> Traceback (most recent call last):
> File "imptk.py", line 1, in <module>
> import tkinter
> File
> "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/tkinter/__i
> nit__.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/3.1/lib/python3.1/lib-dyn
> load/_tkinter.so, 2): no suitable image found. Did find:
>
> /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/lib-dynload/_t
> kinter.so: mach-o, but wrong architecture
What version of python3.1 did you install? This does not happen with
the most recent Python 3.1.x's installed by the python.org installers.
There were a number of changes included in Python 3.2 (and 2.7) to
better support building on Mac OS X 10.6 where 64-bit executables are
preferred. If you build your own Python 3.1 on 10.6, you will need to
tweak the build, probably the easiest thing is to only build 32-bit
only. But Python 3.1 is already in security-fix-only mode: best to move
on to Python 3.2 which does not have these issues. See also:
http://www.python.org/download/mac/tcltk/
--
Ned Deily,
nad at acm.org
More information about the Python-list
mailing list