From: Julien Pauty on
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
From: Kevin Walzer on
There has been a lot of traffic on the MacPython list about this--see
the list archives.

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
From: Jeff Hobbs on
On Jun 25, 1:54 am, Julien Pauty <julien.pa...(a)gmail.com> wrote:
> 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 bughttp://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.

The OS X equation is confuzzulating due to version and API changes in
Mac OS X. Let's review ...

OS X 10.5 ships Tcl/Tk 8.4 built 32-bit only i386+ppc using Carbon.
OS X 10.6 ships Tcl/Tk 8.5 built 32/64 i386+x86_64 using Cocoa.

The Cocoa port of Tk was necessary for 64-bit support, as Apple never
did supply the promised 64-bit Carbon. Tk 8.5 has Cocoa as an option,
and it is default in Tk 8.6.

ActiveTcl 8.5 still ships as 32-bit i386+ppc Carbon because going to
Cocoa also means you have to drop OS X 10.4 support (out of curiousity
- does anyone care about OS X 10.4 anymore that isn't stuck on what's
already installed?). 8.5 plans to do so later this year (leaving
behind our OS X 10.4 brethren to older versions). ActiveTcl 8.6 (Tcl/
Tk 8.6 is in beta) already ships i386+x86_64 Cocoa.

Now there is the issue that Tkinter links to a specific version of Tcl/
Tk. I am currently working on a patch that will remove this
limitation (making the binary Tk version independent).

So what do you do?

Well, it depends on what mix you are trying to make. The easiest is
to just run
arch -i386 python2.7
and then it will find the compatible i386 Tk. The next release of
ActivePython 2.7 (which is building i386+x86_64) will have the Tk
version independence, so it could work with core Tk or AT 8.6, or 8.5
in 32-bit mode.

Less confuzzulated?

Jeff