What is the best way to upgrade python?

Paul Boddie paul at boddie.org.uk
Fri Mar 9 06:56:01 EST 2007


On 8 Mar, 22:13, "ying... at gmail.com" <ying... at gmail.com> wrote:
> Hi,
>
> i am using red hat enterprise 4. It has python 2.3 installed. What is
> the best way to upgrade to python 2.4?

By installing a version from the source packages available from
python.org.

> I think one way is to compile python 2.4 from the source, but I can't
> remove the old one since when i do 'rpm -e python', i get error like
> 'failed dependencies'.

That's because various administrative programs (and perhaps others)
depend on Python 2.3 - unless Red Hat provide versions of these for
Python 2.4 (which I suppose they don't in RHEL 4), then you can't
remove Python 2.3 from your system.

Either configure the source package choosing --prefix as something
other than /usr (the default is /usr/local) and then install using
"make install", or choose --prefix as /usr and do a "make altinstall".
Using package management tools to build custom packages which can then
be installed via the system tools might be an even better solution,
since you can then manage what you've done and uninstall if necessary,
but I can't tell you how that's done on Red Hat (with RPMs and so on).

Paul




More information about the Python-list mailing list