Snow Leopard and Python (that is OS X 10.6 and wxPython)
Archive - Originally posted on "The Horse's Mouth" - 2010-07-26 05:58:21 - Graham EllisI'm impressed by how few "issues" I have had in switching to the new Mac I an using for most courses, running Mac OS X 10.6.4 - that's "Snow Leopard". But I got a screen-full when I called up the wx GUI in Python:
wizard:python graham$ python food
Traceback (most recent call last):
File "food", line 1, in <module>
import wx
File "/var/tmp/wxWidgets/wxWidgets-13~231/2.6/DSTROOT/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/__init__.py", line 45, in
File "/var/tmp/wxWidgets/wxWidgets-13~231/2.6/DSTROOT/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_core.py", line 4, in
ImportError: /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_core_.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)
wizard:python graham$
That is - err - spectacular.
Analysis - Python is running 64 bit, but the wx module is compiled up for 32 bit only. For most of the time with a GUI, the 32 bit version will be perfectly adequate, and you can set up an environment variable to request that version:
wizard:python graham$ export VERSIONER_PYTHON_PREFER_32_BIT=yes
wizard:python graham$ python food
[program runs]
wizard:python graham$
Easy when when you know how!