[mod_python] Mixed Python versions

Aaron Maxwell amax at snaplogic.org
Mon Jun 11 15:03:59 EDT 2007


Hi,

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
python2.3 .  We want to use 2.4 for our webapps, and have installed it
on the system as well (under /usr/local).  We think we have configured things
correctly, including setting PATH for apache.  At this
point we are still trying to get a test script (mptest.py [1])
working.  It currently fails, with an internal server error (500).

Two interesting lines appear in the apache error log:
[Mon Jun 11 11:51:04 2007] [error] python_init: Python executable 
found '/usr/local/python2.4/bin/python'.
[Mon Jun 11 11:51:04 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'.

Basically, the correct executable under /usr/local/python2.4 is being
used.  But the python path is all python2.3. 

Several people have had a version-mismatch problem and posted about it
on this list; none of their fixes seem to help here.  Any ideas or
suggestions?

Thanks in advance.

[1] http://www.modpython.org/live/current/doc-html/inst-testing.html

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


More information about the Mod_python mailing list