[mod_python] Trouble with python versions.

Graham Dumpleton graham.dumpleton at gmail.com
Fri Nov 23 20:20:50 EST 2007

Did you run:

  make distclean

after having done previous failed builds of mod_python?

Did you make sure you did a full Apache 'stop' rather than a
'restart'? A 'restart' may not unload the old Python libraries from
Apache process memory properly.

What do you get if you run:

  ldd mod_python.so


On 23/11/2007, chris lyon <chris.lyon at spritenote.co.uk> wrote:
> 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
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list