[mod_python] Can't get/create handler errors

Jim Gallacher jpg at jgassociates.ca
Fri Jan 12 18:40:37 EST 2007

Alainna C. Wonders wrote:
> Hi All, 
> I have a Scientific Linux 4.2 server with two versions of python installed 
> (2.3.4, stock; 2.4.2, my installation).  
> In my apache error log, I see errors like: 
> python_handler: no interpreter callback found.
> python_handler: Can't get/create interpreter.
> make_obcallback: could not import mod_python.apache.\n
> ImportError: No module named mod_python.apache
> make_obcallback: Python path being used 
> "['/usr/lib/python23.zip', '/usr/lib/python2.3', 
> '/usr/lib/python2.3/plat-linux2', '/usr/lib/python2.3/lib-tk', 
> '/usr/lib/python2.3/lib-dynload', '/usr/lib/python2.3/site-packages', 
> '/usr/lib/python2.3/site-packages/gtk-2.0']".
> My configure command looked like this: 
> ./configure --with-apxs=/usr/sbin/apxs 
> --with-python=/usr/local/bin/python2.4
> It ran without error, as did make/make install. 
> I have also set a PATH variable in the httpd init script telling it to 
> look in /usr/local/bin first.  There is /usr/local/bin/python, which is 
> set to Python 2.4.2
> Any recommendations?  I've seen some stuff on google, and it suggested 
> setting apache's path, which I thought could be done by setting the PATH 
> variable in the init script and then restarting the daemon.

Well, that should work. I assume you are seeing the correct mod_python 
version string in your Apache log after a restart? ie something like:

[Fri Jan 12 17:37:16 2007] [notice] Apache/2.2.3 (Debian) 
mod_python/3.3.0b Python/2.4.4 configured -- resuming normal operations


More information about the Mod_python mailing list