[mod_python] Trouble with python versions.

chris lyon chris.lyon at spritenote.co.uk
Fri Nov 23 07:50:54 EST 2007


I'm trying to run django on Mandriva 10.1 and to this end I'm loading 
mod_python. The default Mandriva installation supplies python 2.4.3 and 
apache 2.2.3. I wish to use python 2.5.1 as I require yield() as a 
function but need to retain the original python version for the various 
config duties it performs. So I have installed python2.5.1 which I can 
start on the command line as python2.5 as opposed to python.
Upon running the django version which also runs under python2.4.3 I get 
Segmentation fault and after following the guides on-line, have upgraded 
Apache to 2.2.6 which allows me to import mod_python successfully under 
2.5.1 but not under 2.4.3.

I configure with
./configure --with-apxs=/usr/local/apache2/bin/apxs 
--with-python=/usr/bin/python2.5

and have the following directives in httpd.conf

LoadModule python_module /usr/local/apache2/modules/mod_python.so

<Location "/SUEagles/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE football.settings
    PythonPath "['/home/chris/SUFC/django'] + sys.path"
    PythonDebug On
</Location>

mod_python.so is the only version on the machine, in the location described.

However upon starting apache I get

[Fri Nov 23 11:34:15 2007] [notice] mod_python: using mutex_directory /tmp
[Fri Nov 23 11:34:15 2007] [notice] Apache/2.2.6 (Unix) mod_python/3.3.1 
Python/2.4.3 configured -- resuming normal operations

and the segmentation errors occur. Ho do I get this configuration to use 
python2.5, I understood that was the function of the with-python directive.

Chris



More information about the Mod_python mailing list