[Pythonmac-SIG] Installing wxPython with ActivePython and OSX
Kevin Ollivier
kevino at theolliviers.com
Mon Apr 17 22:07:05 CEST 2006
Hi Trent,
On Apr 17, 2006, at 11:44 AM, Trent Mick wrote:
> [Thomas Juntunen wrote]
>>> I'm trying to get wxPython going with ActivePython, Komodo and
>>> OSX.4.6
>>>
>>> The wx installer is installing to my framework "system" python
>>> (Apple
>>> 2.3.5)
>>>
>>> Is there any way to get this to work with my setup?
>
> wxPython on the Mac seems to be painful right now.
Suggestions and contributions welcome! :-)
> 1. You need to get the correct build for your version of Python. For
> ActivePython 2.4.x or MacPython 2.4.x that means getting one of the
> builds with "-py24" in the package name.
Of course, this is pretty much the same as with every other (binary)
Python extension, isn't it?
> 2. They have "ansi" and "unicode" builds. From what I can tell the
> "ansi" builds are probably only useful for Mac OS X 10.2.x
> compatibility. If you are using Mac OS X 10.3 (Jaguar) or greater
> then I'd stick with the "unicode" builds.
The ansi builds are for people who haven't considered Unicode support
when building their wxPython apps, and thus might have issues when
their data is automatically converted to and from Unicode. In ansi
mode, it just passes the actual 'bytes' around, so the user is in
total control over how the data is encoded. It took me a couple days
of auditing my codebase before I got everything working with Unicode,
and while I'm glad I did, up until that point I (and users of my app)
were doing just fine with ANSI builds.
But yes, in general, Unicode is the recommended build on OS X, or any
modern platform for that matter.
>> There are lots of packages available as pre-built binaries for
>> Python 2.4.x
>> on Tiger available here:
>>
>> http://pythonmac.org/packages/
>
> 3. There don't seem to be builds of wxPython for Mac OS X/Intel
> anywhere. The builds that they have up here for Mac OS X
>
> http://www.wxpython.org/download.php#binaries
>
> are for the PowerPC architecture. I'm not on the wxPython mailing
> lists so I don't know if there are Mac OS X/Intel builds hiding
> somewhere or in the works.
There aren't any Intel-only binaries, but packages containing
Universal binaries (built using the Universal MacPython Framework)
was finished up late last week and are just awaiting being uploaded
to the wxPython SF site. So it should be pretty soon. They should
work with the ActivePython build too, but I don't have a machine
around to test that with. They will only work with Tiger though, due
to the reasons mentioned above.
> I was able to install wxPython for Python 2.4:
> wxPython2.6-osx-unicode-2.6.3.2-macosx10.3-py2.4.dmg
> on Mac OS X 10.3/PowerPC and use it (only minor testing).
>
> Unfortunately I was also able to *install* it on Mac OS X 10.4/
> Intel
> but it doesn't work (importing "wx" fails) because the binary
> modules
> in wx are for ppc while the running Python is x86.
Right. About the only thing we could do at this point is to add a
command-line check on the architecture of the Python binary and bomb
out if it's incorrect. I could go ahead and add such a test, although
I think the OS X Installer will just give a generic "you are not
allowed to install this package" message, which is arguably just as
confusing to the user.... We could also add ppc to the filename,
though I think it will easily be missed.
In that sense, it's kinda a shame that the whole Package Manager deal
fell apart. While I never liked the idea of a centralized repository
for packages, the idea of Python developers being able to use
distutils to create an installer that worked cross-platform (perhaps
using a download and double-click solution like Win and OS X
installers), and also allowed the user to manage their packages via
an "Add/Remove/Update packages" interface was, I think, a very good
one. It's a shame the time I put into crafting a cross-platform
wxPython interface for this was wasted... ;-/
Regards,
Kevin
> It looks like using wxPython on Mac OS X/Intel requires you to compile
> it yourself from source:
>
> http://sourceforge.net/project/showfiles.php?group_id=10718
> wxPython-src-2.6.3.2.tar.gz
>
> Cheers,
> Trent
>
> --
> Trent Mick
> TrentM at ActiveState.com
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
More information about the Pythonmac-SIG
mailing list