Did you install this Python version yourself, or are you using MacPorts Python?
Graham
Can you send output from running:
file /Library/Frameworks/Python.framework/Python
The above to me indicates that that Python framework installation does
not actually have all architectures compiled into it.
Graham
If that installer is officially supplied by PSF, then a bug should be
lodged then at bugs.python.org over the fact that they are
distributing an installer which will not work on 64 bit MacOS X
platforms where framework is embedded into a 64 bit application such
as the version of Apache supplied by Apple. Thus, not usable with
mod_python or mod_wsgi.
What it looks like you will need to do is install Python 2.6 from
source code. I believe the configure options should be:
./configure --prefix=/usr/local/python-2.6
--enable-framework=/usr/local/python-2.6/frameworks
--enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.5
--with-universal-archs=all
The only other option you have is to force Apache to run as 32 bit
instead of 64 bit. For that, see documentation and comments in:
http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX
Graham
BTW, you might just be better off installing your own copy of Apache
from source. This will install as 32 bit and not 64 bit and so that
Python 2.6 version will then work fine.
The benefits of running 32 bit are that you have less problems with
third party C extension modules and you don't have to perform hacks to
also get them installed with 64 bit architecture objects. The Apple
Python version understand extra environment variables which will force
Python extensions to install with all architectures, but the PSF
version probably doesn't and so it would be necessary to hack
makefiles/setup.py files to add in special arch flags.
Graham
First off then, just try what was in comment at end of that wiki page
I emailed. Quoting it here.
"""I was able to force apache on leopard to run in 32-bit mode as follows.
in /System/Library/LaunchDaemons/org.apache.httpd.plist add these
three arguments the start of the <ProgramArguments> array:
<string>/usr/bin/arch</string> <string>-arch</string> <string>i386</string>
the resulting apache command line looks like this:
/usr/bin/arch -arch i386 /usr/sbin/httpd -D FOREGROUND"""
Just be aware that on OS updates, this plist file is likely to be
replaced if Apache was changed.
Graham