Python 2.7, tkinter problem on OSX

Julien Pauty julien.pauty at gmail.com
Fri Jun 25 04:54:07 EDT 2010


Dear list,

Last version of my software relies on ttk. Under windows and linux
this is fine. But, OSX users are facing problems (I don't have access
to a Mac myself for testing...). Those with OSX 10.6 can run the
program. It seems that OSX 8.6 ships with Tk8.5.

People with OSX 8.5 cannot run the app. I told them to install python
2.7 which seems to be the first version on OSX to ship with Tk8.5.
However, the program still does not run. I asked a person to launch a
python 2.7 interpreter and try to import tkinter. This is an excerpt
of the output:

  from Tkinter import *
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/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.7/lib/python2.7/lib-dynload/_tkinter.so,
2): no suitable image found.  Did find:
        /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so:
no matching architecture in universal wrapper

Full log is there: http://pastebin.com/vky8FbrP

I asked a person to simply open a python2.7 shell and import Tkinter.
He got the same error.

All of this is executed with Python 2.7rc1. Archives that are on the
ftp of python.org.

I have seen this bug http://bugs.python.org/issue9045, which is
related, but deals with the specificities if OSX 64bit.

Can this problem be solved by installing Active TK 8.5 for OSX ?

Anybody knows what is the good combination of installer / libraries to
install to run a ttk application on OSX 8.5 ? Ideally, I would like to
document the setup procedure for 8.5 users.

Cheers,

Julien



More information about the Python-list mailing list