re-point mod_python - is it possible?

Graham.Dumpleton at gmail.com Graham.Dumpleton at gmail.com
Wed Mar 7 06:00:24 CET 2007


On Mar 7, 3:08 pm, "leland" <richard.lel... at gmail.com> wrote:
> i've upgraded my RHEL3 box to run python 2.3. problem is, mod_python
> still points to the old python 2.2. is there any way to tell
> mod_python that i've got a new version of python installed, and
> to use that version now?
>
> any help would be great - thanks!

First off, your existing mod_python will only work against Python 2.2.
You cannot simply coax it into trying to use Python 2.3. If you have
completely replaced Python 2.2 with 2.3 such that 2.3 is now the
default Python version, then all you need to do is recompile
mod_python from source code, or install prebuilt mod_python package
compiled against 2.3.

If however you now have both Python 2.2 and 2.3 installed at the same
time in different locations, it can get a bit more tricky. If this is
the case and even if you reinstall mod_python which has been compiled
against 2.3, you can have problems by fact that the way Python
initialises itself involves searching for 'python' executable in PATH.
If the version it finds is actually that for Python 2.2, even though
mod_python is built against 2.3, it may attempt to try and use Python
library from 2.2. If this is the case, you need to ensure that the
PATH environment used by Apache when started finds 'python' for 2.3
first.

Graham




More information about the Python-list mailing list