How do I upgrade python 2.5.2 to python 2.6rc2 on ubuntu linux 8.04?

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


Asked by: Adelaide244 | Posted: 28-01-2022






Answer 1

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 with ln -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 with sudo easy_install <name>, but some like PyGTK+ are not so easy. You'll have to follow custom installation procedures for each such library.

Answered by: Tara295 | Posted: 01-03-2022



Answer 2

I have the same issue, and apparently pre-built binaries can be found here:

# Python 2.6
deb http://ppa.launchpad.net/doko/ubuntu intrepid main
deb-src http://ppa.launchpad.net/doko/ubuntu intrepid main

Answered by: David127 | Posted: 01-03-2022



Answer 3

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)

./configure
make
sudo make install

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

Answered by: Alina935 | Posted: 01-03-2022



Answer 4

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:

./configure
make
sudo make install
ls -l /usr/local/bin

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 when python2.6 is run you get your shiny new python 2.6rc2. Python displays the version when it starts an interactive interpreter.

Answered by: Agata995 | Posted: 01-03-2022



Similar questions

Python 2.x --> Python 3.x upgrade

I'm on Mac OS X El Capitan, which comes with Python 2.7.10; I want to upgrade to 3.x. I've downloaded the 64-bit version from the website and installed it through brew however whenever I type python --version into the terminal the version is always 2.7.10. I can make terminal run in 3.x by typing python3 but I need the system to run on python3 as I'm running code ...


macos - Upgrade Python to 2.6 on Mac

I'd like to upgrade the default python installation (2.5.1) supplied with OS X Leopard to the latest version. Please let me know how I can achieve this. Thanks


macos - Trying to upgrade Python to 3.0 on Mac OS 10.5.8

I'm having some problems upgrading Python on my Mac. For my first attempt, I downloaded and installed the 2.6.4 dmg MacPython installer from http://python.org/download/mac/. This did install 2.6.4, and when I ran 'python' from the terminal it says that version. However, I also had a test script where I am doing: import os, json ...


Upgrade python to 2.7 and Django to 1.4, but it tells me No module named *

I have just upgraded my python to 2.7 on my Ubuntu server, and reinstalled the Django to 1.4. I use python flup to run the Django application as fastcgi, but when I try to restart the application, it keeps telling me No module named * e.g. File "./manage.py", line 10, in &lt;module&gt; execute_from_command_line(sys.argv) ... File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", l...


macos - Python pip broken after OS X 10.8 upgrade

Made the upgrade to Mac OS X 10.8 (Mountain Lion) and get now the following error when trying to call $ pip: Traceback (most recent call last): File "/usr/local/bin/pip", line 5, in &lt;module&gt; from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in &lt;module&gt; working_set.requ...


upgrade python from 2.4 to 2.6 in plone

I am trying to upgrade my plone version from 3.3.5 to 4.0. For this I went to this site: updating plone. But I got stuck in the first point. In plone 3, I have python version of 2.4. But for plone 4.x I will need python 2.6. How do I upgrade my python version? In my buildout.cfg I have:


python - NumPy won't upgrade from 1.5.1 to 1.6.2 on OS X 10.7

I am attempting to update/upgrade my NumPy, but am failing. I think I might have multiple versions of NumPy installed in different directories, but python by default imports an old one. Any help? Here's where my Python is: Gonzo-vs-Kitties:~ brian$ which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python Here's the version that Python imports: Gonzo...


Upgrade Python 2.4 to 2.6 or 3.0

I am running Python 2.4 on Redhat Linux 5. Any idea how to upgrade to either Python 2.6 or 3.0? Thanks in advance, Sum


Should I upgrade python 2.7.3 to 2.7.4

The reason I ask is that some of the packages I have installed were specific to 2.7.3 as windows installers from PyPI. Would these need to be re-installed or would pip update these? Thanks.


python - Can't upgrade Scipy

I'm trying to upgrade Scipy from 0.9.0 to 0.12.0. I use the command: sudo pip install --upgrade scipy and I get all sorts of errors which can be seen in the pip.log file here and I'm unfortunately not python-savvy enough to understand what's wrong. Any help will be appreciated.


python - Upgrade to numpy 1.8.0 on Ubuntu 12.04

I'm running Ubuntu 12.04 which comes by default with NumPy 1.6.0 (I have, actually had, Python 2.7.3 installed). As a result of the answer to this question polyfit() got an unexpected keyword argument &#39;w&#39;, I need to upgrade it. I downloaded the .tar.gz packa...


macos - Upgrade Python to 2.6 on Mac

I'd like to upgrade the default python installation (2.5.1) supplied with OS X Leopard to the latest version. Please let me know how I can achieve this. Thanks


macos - Trying to upgrade Python to 3.0 on Mac OS 10.5.8

I'm having some problems upgrading Python on my Mac. For my first attempt, I downloaded and installed the 2.6.4 dmg MacPython installer from http://python.org/download/mac/. This did install 2.6.4, and when I ran 'python' from the terminal it says that version. However, I also had a test script where I am doing: import os, json ...


How to upgrade the version of Python used by Apache?

On a Red hat box, I upgraded Python from 2.3 to 2.6.4 and changed the symlink to python so when I type in python the 2.6.4 interpreter comes up. However my .py file works from the command-line, but not in the browser. It seemed like a sys.path issue so I opened the file in a browser and printed out sys.path. Surprisingly, my sys.path is differ...


build - How can I upgrade the sqlite3 package in Python 2.6?

I was using Python 2.6.5 to build my application, which came with sqlite3 3.5.9. Apparently though, as I found out in another question of mine, foreign key support wasn't introduced in sqlite3 until version 3.6.19. However, Python 2.7 comes with sqlite3 3.6.21, so this work -- I decided I wanted to use foreign keys in my application, so I tried upgrading to python 2.7. I'm using twisted, and I couldn't for the life...


Upgrade python to 2.7 and Django to 1.4, but it tells me No module named *

I have just upgraded my python to 2.7 on my Ubuntu server, and reinstalled the Django to 1.4. I use python flup to run the Django application as fastcgi, but when I try to restart the application, it keeps telling me No module named * e.g. File "./manage.py", line 10, in &lt;module&gt; execute_from_command_line(sys.argv) ... File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", l...


upgrade - How to make newest version of Python the default or first in path

I have installed a new version of Python, so I want to make sure when Python is invoked that version is first in my path. So, now on my 'C' drive I have "Python27" and "Python32" (old and new version, respectively). When I type "python" in the command line I get "Python 2.7". Using control panel I have changed the "path" and "pythonpath" user variables (from 'C:\Python27' to 'C:\Python32') and to be sure I have re...


macos - Python pip broken after OS X 10.8 upgrade

Made the upgrade to Mac OS X 10.8 (Mountain Lion) and get now the following error when trying to call $ pip: Traceback (most recent call last): File "/usr/local/bin/pip", line 5, in &lt;module&gt; from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in &lt;module&gt; working_set.requ...


upgrade python from 2.4 to 2.6 in plone

I am trying to upgrade my plone version from 3.3.5 to 4.0. For this I went to this site: updating plone. But I got stuck in the first point. In plone 3, I have python version of 2.4. But for plone 4.x I will need python 2.6. How do I upgrade my python version? In my buildout.cfg I have:


python - NumPy won't upgrade from 1.5.1 to 1.6.2 on OS X 10.7

I am attempting to update/upgrade my NumPy, but am failing. I think I might have multiple versions of NumPy installed in different directories, but python by default imports an old one. Any help? Here's where my Python is: Gonzo-vs-Kitties:~ brian$ which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python Here's the version that Python imports: Gonzo...


Upgrade Python 2.4 to 2.6 or 3.0

I am running Python 2.4 on Redhat Linux 5. Any idea how to upgrade to either Python 2.6 or 3.0? Thanks in advance, Sum






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top