With so many versions installed in so many locations, really hard to know what is going on.
Try this. 1. Create a file called /tmp/testhttpd.sh. In it add the following except to add the correct location of the Apache httpd for Apache installation you are using. #/bin/sh PYTHONVERBOSE=1 export PYTHONVERBOSE /usr/sbin/httpd -X 2. Make file executable. chmod +x /tmp/testhttpd.sh 3. Make sure your existing Apache instances are shutdown. apachectl stop 4. Run this test script: sudo /tmp/testhttpd.sh 5. Make request to URL. 6. Kill the test script using Ctrl-C. 7. Check the error logs for that Apache installation and see what you can find about the path locations that Python is trying to access. For example: [Mon Jan 25 10:25:50 2010] [notice] mod_python: using mutex_directory /tmp # installing zipimport hook import zipimport # builtin # installed zipimport hook # /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.pyc matches /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.py import site # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.pyc # /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.pyc matches /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.py import os # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.pyc import posix # builtin # /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.pyc matches /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py 8. Give a sample to show where it is trying to access stuff from. Graham 2010/1/23 fhuddles <[email protected]>: > > > On Jan 22, 11:20 pm, Graham Dumpleton <[email protected]> > wrote: >> 2010/1/23 fhuddles <[email protected]>: >> >> >> >> > On Jan 22, 4:53 am, Graham Dumpleton <[email protected]> >> > wrote: >> >> Is /usr/bin/python still pointing at original Apple Python 2.3 version? >> > Yes; I removed it. >> >> You should not have removed /usr/bin/python. It must be left as >> originally supplied by Apple, pointing at Apple Python 2.3. If you >> remove it or change what it is pointed at, you risk causing any Apple >> system scripts which depend on it breaking. > > OK I put it back. I'm not sure it's exactly the same: I pointed it to > Current in that directory. >> >> I'll respond later about the excess of versions you have. You might >> explain why you have so many different versions and distributions >> installed. >> > > The Apple versions were just installed with the system, I guess. The > Fink (/sw) and macports (/opt) ones were mostly installed as > dependencies of other packages. I don't really know why there are so > many versions, though: perhaps the packages specified those versions. > I installed 3.0 at one point, I think from source or binaries > downloaded from the Python site, and then after having problems using > 3.0 > with various libraries and other software, I installed the MacPython > python2.6 via dmg from the Python site. > >> Graham >> >> >> >> >> What versions of Python are under >> >> /System/Library/Frameworks/Python.framework? >> >> > ls -l /System/Library/Frameworks/Python.framework/Versions >> > total 8 >> > drwxr-xr-x 10 root wheel 340 Dec 11 18:42 2.3 >> > lrwxr-xr-x 1 root wheel 3 Apr 4 1976 Current -> 2.3 >> >> >> What versions of Python are under /Library/Frameworks/Python.framekwork? >> >> > ls -l /Library/Frameworks/Python.framework/Versions >> > total 8 >> > drwxrwxr-x 10 root admin 340 Oct 27 13:50 2.6 >> > drwxrwxr-x 10 root admin 340 Mar 15 2009 3.0 >> > lrwxr-xr-x 1 root admin 3 Nov 26 19:56 Current -> 2.6 >> >> >> Do you have Python installed in any other locations, eg. from fink or >> >> MacPorts Python under /opt? >> >> > Yes: from fink, in /sw/bin: >> > l >> > s -l /sw/bin/python* >> > lrwxr-xr-x 1 root admin 9 May 5 2009 /sw/bin/python -> >> > python2.6 >> > lrwxr-xr-x 1 root admin 16 May 5 2009 /sw/bin/python-config >> > -> python2.6-config >> > -rwxr-xr-x 1 root admin 3423412 Nov 13 2008 /sw/bin/python2.4 >> > -rwxr-xr-x 1 root admin 3913784 May 6 2009 /sw/bin/python2.5 >> > -rwxr-xr-x 1 root admin 1417 May 6 2009 /sw/bin/python2.5- >> > config >> > -rwxr-xr-x 1 root admin 9816 May 5 2009 /sw/bin/python2.6 >> > -rwxr-xr-x 1 root admin 1364 May 5 2009 /sw/bin/python2.6- >> > config >> >> > I also see this in /opt: >> >> > ls -l /opt/local/bin/python* >> > lrwxr-xr-x 1 root admin 73 Jan 13 14:54 /opt/local/bin/python2.6 - >> >> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/ >> > python2.6 >> > lrwxr-xr-x 1 root admin 80 Jan 13 14:54 /opt/local/bin/python2.6- >> > config -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/ >> > bin/python2.6-config >> > lrwxr-xr-x 1 root admin 74 Jan 13 14:54 /opt/local/bin/pythonw2.6 - >> >> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/ >> > pythonw2.6 >> >> >> Graham >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "modwsgi" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group >> > athttp://groups.google.com/group/modwsgi?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
