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
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 installinstallation style.Next, remove the
/usr/bin/pythonsymlink. 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.