[mod_python] [SPAM] 500 Internal Server Error

Thomas Allen thomasmallen at gmail.com
Sat Nov 15 22:15:22 EST 2008


I'm running mod_python via MacPorts (ports installed Apache, Python, 
etc.) on a Mac. It looks like mod_python is using my standard Python 
distribution and not the one located at /opt/local/bin/python2.5. How 
can I make sure that mod_python uses this Python?

mod_python is at:

<module 'mod_python' from 
'/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mod_python/__init__.pyc'>

which is in that python2.5 sys.path. I use this custom Python because 
MySQLdb no longer installs on Leopard Macs, and the posts I've seen with 
possible fixes do not work on this computer.

Here's what I get in my Apache logs:

[Sat Nov 15 22:08:14 2008] [error] make_obcallback: could not import 
mod_python.apache.\n
ImportError: No module named mod_python.apache
[Sat Nov 15 22:08:14 2008] [error] make_obcallback: Python path being 
used 
"['/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip', 
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5', 
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', 
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac', 
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages', 
'/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python', 
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk', 
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', 
'/Library/Python/2.5/site-packages', 
'/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC']".
[Sat Nov 15 22:08:14 2008] [error] get_interpreter: no interpreter 
callback found.
[Sat Nov 15 22:08:14 2008] [error] [client ::1] python_handler: Can't 
get/create interpreter., referer: http://localhost/703Designs/

Thanks,
Thomas


More information about the Mod_python mailing list