[mod_python] Mixed Python versions - FIXED

Graham Dumpleton graham.dumpleton at gmail.com
Mon Jun 11 18:28:36 EDT 2007

On 12/06/07, Aaron Maxwell <amax at snaplogic.org> wrote:
> We figured it out.  From a previous configuration, our apache was set to load
> mod_wsgi (stable version, 255).  Apparently there was a conflict between it
> an mod_python in this case.  Note that there is no inherent conflict, AFAIK:
> the problem was with our production server, whilst our development server
> worked fine, even though it was also loading mod_wsgi.  I believe the
> mod_wsgi's were built differently on the two systems.  In any case, removing
> the LoadModule directive for mod_wsgi fixes the problem in our setup.

Your problems are not really caused by mod_wsgi although it does
trigger it. The real problem derives from the fact that on RHEL the
version of Python they provide does not include a shared library, or
it isn't installed in the correct location to be found when compiling.
This causes problems if loading both mod_python and mod_wsgi together
even if both are compiled against the same library as an actual copy
of the library has had to be embedded in both Apache modules meaning
there are two copies on memory. This shortcoming of Linux
distributions such as those from RedHat are described in the README
file and web documentation for mod_wsgi. As the documentation says,
the Python distributions need to be rebuilt so they provide a shared
library. For further information see:


In other words, provided that mod_python and mod_wsgi both use a
Python shared library they can coexist. If for some reason you can't
rebuild your Python distribution, then as documented one can build
mod_wsgi but without linking it to Python, so that it uses the version
that is embedded within mod_python.


> On Monday 11 June 2007 13:58, Aaron Maxwell wrote:
> > 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:
> --
> Aaron Maxwell
> SnapLogic - Open Source Internet Data Services
> http://snaplogic.org
> _______________________________________________
> 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