[mod_python] mod_python calls the wrong python executable

mvanier mvanier at cs.caltech.edu
Wed Jul 19 04:30:44 EDT 2006


I'm trying to run mod_python using the latest mod_python snapshot with apache 
2.2 (compiled from source) on Debian Linux.  I've run into a strange error: when 
I try to run a python script through the server, the wrong python executable 
gets called.  Here's the apache error log:

[Wed Jul 19 01:21:25 2006] [error] make_obcallback: could not import 
mod_python.apache.\n
ImportError: No module named mod_python.apache
[Wed Jul 19 01:21:25 2006] [error] make_obcallback: Python path being used 
"['/usr/lib/python24.zip', '/usr/lib/python2.4', 
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', 
'/usr/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages', 
'/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages/PIL', 
'/var/lib/python-support/python2.4', '/usr/lib/site-python']".
[Wed Jul 19 01:21:25 2006] [error] get_interpreter: no interpreter callback found.
[Wed Jul 19 01:21:25 2006] [error] [client 127.0.0.1] python_handler: Can't 
get/create interpreter.

The sys.path of this python interpreter is the one that would exist if 
/usr/bin/python2.4 (which was installed by Debian) was called instead of the 
correct one, which (in my case) is /usr/local/packages/python/bin/python (which 
I compiled and installed myself from source).  I specified this executable when 
I configured mod_python (using the --with-python option).  For some reason, 
though, it isn't getting used.  Any ideas would be appreciated.

This is my third mod-python-not-working post to this mailing list in a couple of 
days; I apologize for all the questions, but it's been pretty frustrating.

Mike





More information about the Mod_python mailing list