I have python 2.5.2 on my Debian system n want to upgrade it to python 2.6.


Got to know that apt-get install package searches for package in /etc/apt/sources.list

I have downloaded python 2.6.2. How to add an entry to the file /etc/apt/sources.list ? :(

Recommended Answers

All 9 Replies

It's a bad idea to try to upgrade your python installation on a linux system. Don't do it, because the system uses a specific python version to run. What you can do is install several versions of python. Currently, linux systems have 2 python packages: the package which comes with the distribution (2.5 in your case) and a package python3. You can install python3 with your package manager (it will coexist with your python 2.5 and the command will be 'python3' instead of python). If you want to install python 2.6 or 2.7, you must do it from the python source code with a ./configure - make - make altinstall sequence (note the altinstall). You should probably better not do it because you will have new problems with some libraries that are not yet installed on your system, etc. Python 2.5 is very good, try to work with it.

I know with Ubuntu, you can install 2.6, 2.7, and 3.0 in addition to the 2.5 it comes with. And since Ubuntu, being a derivative of Debian, shares many packages with Debian, maybe you can too. But Grib is right about the rest of it.

ubuntu 10.10 comes with 2.6.6 by default.

How to add an entry to the file /etc/apt/sources.list

sources.list is a list of the repositories to search. It has nothing to do with the individual packages. Try 'man dpkg' and you should find something similar to (I don't remember the exact syntax for dpkg)
dpkg -f package_name
which you can use to see if Python2.6 is in one of the repositories. I found python2.6_2.6.6-6_i386.deb here so you should be able to install it normally. You can always Google for "deb package_name" as well to find something.

Thats right! I have to update Ubuntu. I forgot that was yesterday.

Thats right! I have to update Ubuntu. I forgot that was yesterday.

I wonder why we don't yet have python 2.7 on our linux distributions.I have python 2.6.5 in Mandriva 2010. It may not last long: I read that the Mandriva company is dying and there was a fork of the linux distro recently called mageia (see http://www.mageia.org/en/). :(

I have 2.7 installed on my Slackware disto. Bleachbit will not run with 2.7, so it may be that there are third party packages that have to be converted first.

Mandriva is getting split? Hmm..
As for 2.7, maybe they already had 2.6 modules written, and decided to be lazy.

Python 2.5 is very good, try to work with it.

I'm taking this advice.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.