[mod_python] [SPAM] 500 Internal Server Error

Graham Dumpleton graham.dumpleton at gmail.com
Sun Nov 16 00:26:39 EST 2008


Have you tried rebuilding mod_python from source code and use
--with-python option to configure script to have it use alternate
Python installation?

If on Leopard, you may need to obtain mod_python from subversion
repository for it to build properly.

If code not mod_python specific but WSGI capable, you may be better
off using mod_wsgi instead and is does a few things properly for Mac
platform that mod_python source code doesn't as far as building it.

Graham

2008/11/16 Thomas Allen <thomasmallen at gmail.com>:
> 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
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list