[mod_python] Mixed Python versions

Aaron Maxwell amax at snaplogic.org
Mon Jun 11 16:58:10 EDT 2007


On Monday 11 June 2007 12:03, Aaron Maxwell wrote:
> I'm getting an error with either apache or mod_python using an
> unexpected Python version.  The system is RHEL 4.5, which ships with

Here's some extra information.  I configured and installed mod_python from 
source using the following:

./configure --libdir=/usr/local/python2.4/lib --with-python-src=/home/amlocal/src/Python-2.4.4 --with-python=/usr/local/python2.4/bin/python --includedir=/usr/local/python2.4/include/python2.4/ 
&& make && echo Okay
sudo make install

Apache is version 2.0.52.  The python referred to above is version 2.4.4.  The 
build proceeds without errors or significant warnings; I can post a log if it 
if it helps.  Again, this is on Linux - specifically RHEL 4, on an athlon 
i686.

Bouncing httpd and pointing the browser to mptest.py generates the following 
in the apache error log:
<pre>
[Mon Jun 11 13:50:53 2007] [notice] caught SIGTERM, shutting down
[[ snip a few lines about LDAP, etc. ]]
[Mon Jun 11 13:50:54 2007] [error] python_init: Python version mismatch, 
expected '2.4.4', found '2.3.4'.
[Mon Jun 11 13:50:54 2007] [error] python_init: Python executable 
found '/usr/local/python2.4/bin/python'.
[Mon Jun 11 13:50:54 2007] [error] python_init: 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'.
[Mon Jun 11 13:50:54 2007] [notice] mod_python: Creating 8 session mutexes 
based on 256 max processes and 0 max threads.
[Mon Jun 11 13:50:54 2007] [notice] mod_python: using mutex_directory /tmp
[Mon Jun 11 13:50:54 2007] [notice] mod_wsgi (pid=4161): Attach 
interpreter ''.
[[ previous line repeated 8 times ]]
[Mon Jun 11 13:50:54 2007] [notice] Apache/2.0.52 (Red Hat) configured -- 
resuming normal operations
[Mon Jun 11 13:50:58 2007] [error] make_obcallback: could not import 
mod_python.apache.\n
ImportError: No module named mod_python.apache
[Mon Jun 11 13:50:58 2007] [error] make_obcallback: Python path being 
used "['/usr/lib/python2.3/site-packages/setuptools-0.6c5-py2.3.egg', '/usr/lib/python2.3/site-packages/MySQL_python-1.2.2-py2.3-linux-i686.egg', '/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']".
[Mon Jun 11 13:50:58 2007] [error] get_interpreter: no interpreter callback 
found.
</pre>

The messages around 13:50:54 should come from the apache restart; those from 
13:50:58 come from the mptest.py request.

-- 
Aaron Maxwell
SnapLogic - Open Source Internet Data Services
http://snaplogic.org


More information about the Mod_python mailing list