I'd like to how to upgrade the default python installation(2.5.2) supplied with ubuntu 8.04 to python 2.6rc2. I'd like to make 2.6 the default python version on the system and migrate all the other useful installed python libraries installed on 2.5.2 to python 2.6rc2. Please let me know how I can achieve this.
Thanks Dirk
Is there any need to?
Ubuntu in general doesn't package RC releases. 2.6 will not be available in Ubuntu until Jaunty Jackalope.
However,, if you insist that you need to install it, then, you'll have to do so without a package manager.
Download the package, and unzip it to a directory
run the following commands (waiting for each to finish as you do so)
There, you have it installed.
It's better to wait for it to be packaged first, espescially as Python is used in a lot of ubuntu internals, so may break your system horribly
It would not be wise to change the default version of Python, i.e. what you get when you type "python" into a shell. However, you can have multiple versions of python installed. The trick is to make sure that the program named "python" on the path is the system supplied version. If you want to run your install of Python 2.6 you'd then type python2.6 into a shell to start it.
Download the package and unzip it, then run:
You should see a python and a python2.6 file, both created on the day you ran make install; delete the python file. Then when
python
is launched the standard system Python version from/usr/bin
will be run, and whenpython2.6
is run you get your shiny new python 2.6rc2. Python displays the version when it starts an interactive interpreter.With the warning that I think it's a tremendously bad idea to replace the default Python with an unreleased beta version:
First, install 2.6rc2. You can download the source from the Python website. Standard
./configure && make && sudo make install
installation style.Next, remove the
/usr/bin/python
symlink. Do not remove/usr/bin/python2.5
. Add a symlink to 2.6 withln -s /usr/local/bin/python2.6 /usr/bin/python
.Once again, I think this is a terrible idea. There is almost certainly a better way to do whatever you're trying to accomplish.
Migrating installed libraries is a much longer process. Look in the
/usr/lib/python2.5/site-packages/
and/usr/local/lib/python2.5/site-packages/
directories. Any libraries installed to them will need to be re-installed with 2.6. Since you're not using a packaged Python version, you cannot use Ubuntu's packages -- you'll have to manually upgrade all the libraries yourself. Most of them can probably be installed withsudo easy_install <name>
, but some like PyGTK+ are not so easy. You'll have to follow custom installation procedures for each such library.I have the same issue, and apparently pre-built binaries can be found here: