[mod_python] switiching to different python version.

Graham Dumpleton grahamd at dscpl.com.au
Mon Jun 27 18:02:36 EDT 2005

On 28/06/2005, at 3:05 AM, amit wrote:

> My webhost has two installations of python: Python 2.2 and Python 2.3.
> The mod_python works with the Python 2.3. But the MySQLdb module is 
> installed
> only on the Python 2.2 installation. This means that I can't use 
> mod_python for accessing
> the MySQL database.
>  It will take a couple of days till my webhost installs the MySQLdb 
> module in the
> Python2.3 installation. They might even not do it as the Python 2.3 
> installation was done
> by a third party software (plesk panel) and they are afraid to mess 
> things up.
> Meanwhile, is there a way to tell the mod_python to use another path 
> for the python interpreter?

When mod_python is built and installed, it is done so against a 
specific version
of Python. You thus can't simply change which version of installed 
Python module
files it uses as it will not work. All that can be done is for 
mod_python to be
rebuilt and reinstalled using the alternate version of Python. This 
however is
going to affect everyone who uses mod_python on that system if the same 
installation is used by everyone. If you are however on a virtual 
hosting system
where you have access to your own Apache configuration and own Apache 
directory, you could look at replacing the mod_python install for just 
your setup.


More information about the Mod_python mailing list