Operating System - Linux
1830242 Members
2313 Online
109999 Solutions
New Discussion

upgrading from python2.3.5 to python 2.4.2

 
SOLVED
Go to solution
labadie_1
Honored Contributor

upgrading from python2.3.5 to python 2.4.2

I have a french flavor of debian (live CD kaella, basically a french knoppix) installed on disk. It comes with python 2.3.5 . As I wanted Python 2.4.2, I modified my /etc/apt/sources.lis, replaced stable by testing, then apt-get install python2.4 . So now, when I type
# python, I have python v 2.3.5
and when I type
# python2.4, I have python 2.4.2

I do not want to keep python 2.3.5, and I would like that python -> launches python 2.4.2.

This must be quite easy, but not for me :-)

Thanks for any hint
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: upgrading from python2.3.5 to python 2.4.2

Shalom,

You have installed a new version of python instead of updating the existing one.

Usually for the installer to update you can use a U parameter on the command line instead of i.

If you want to end up with one version of python now, you may wish to remove the 2.4 and install 2.4 as an update.

Or you can remove 2.4 and rename the the binary.

I recommend the earlier course of action since some applications might not like the second option.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
labadie_1
Honored Contributor

Re: upgrading from python2.3.5 to python 2.4.2

previously on another PC with a similar config, I downloaded Python 2.4.2, did ./configure, make, su, make install, and I had python in /usr/local/bin/python, and python launched 2.3.5, and python2.4 launched 2.4.2. I thought apt-get install was the recommended way to install a package for a Debian. Do you mean I should have done rpm -U ... ?

thanks for your time.
dirk dierickx
Honored Contributor
Solution

Re: upgrading from python2.3.5 to python 2.4.2

on debian you can have multiple version of a software installed and then you can select which it should use when you call it with a general name like 'python'.

this can be controlled using the 'update-alternatives' command.

update-alternatives --config python

a * will show you what your current default is. select python 2.4 and exit. the next time you start python it will use 2.4
labadie_1
Honored Contributor

Re: upgrading from python2.3.5 to python 2.4.2

Thanks Dirk, this sounds like exactly what I want. I will try and let you know.