Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I occasionally have to work on some legacy Python code that is run by the Python 2.5 interpreter in production. I'd like to set my development environment up just like production, so I need to install the python2.5 family of packages.

Of course, I can install from source, but I'd really prefer to use packages unless there is absolutely no way to do it.

However, the 2.5 packages are not included in any of the apt sources that ship with 11.04. Where can I find Python 2.5 packages that are likely to work smoothly with Natty?

Update: It works! I should have read the apt-get output more closely:

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

So here's what I did to get Python 2.5 installed:

: josh@josh; sudo add-apt-repository ppa:fkrull/deadsnakes
: josh@josh; sudo apt-get update
: josh@josh; sudo apt-get install python2.5
[...]
The following packages have unmet dependencies:
 python-minimal : Breaks: python2.5-minimal (< 2.5.5-7) but 2.5.4-1ubuntu6.1 is to be installed
 python2.5 : Depends: python2.5-minimal (= 2.5.5-8~ppa2~natty3) but 2.5.4-1ubuntu6.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
: josh@josh; sudo apt-get -f install
[...]
The following extra packages will be installed:
  python2.5-minimal
Recommended packages:
      python2.5
The following packages will be upgraded:
  python2.5-minimal
[...]
Do you want to continue [Y/n]? 
[...]
Setting up python2.5-minimal (2.5.5-8~ppa2~natty3) ...
: josh@josh; sudo apt-get install python2.5
The following NEW packages will be installed:
  python2.5
[...]
share|improve this question

1 Answer 1

up vote 11 down vote accepted

Launchpad has a topic about this.

Here is a tutorial on installing python 2.5 on Ubuntu 10.10. 11.04 should be identical for this.

From that websites the commands would be:

sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.5

Executing python2.5 file at commandline would execute 'file' with v2.5. python file would use the newest version.

I only used this once roughly a year ago so be wary of pitfalls.

share|improve this answer
    
You may also know the answer to my next question: How can I use LaunchPad.net packages in 11.04 (Natty Narwhal)? :) –  Josh Glover May 5 '11 at 12:21
    
This doesn't work for me; see my question. :( –  Josh Glover May 5 '11 at 12:23
    
Weird. It clearly states here launchpad.net/~fkrull/+archive/deadsnakes natty with 2.5 is available (check the Display sources.list entries to see natty) (2.5.5-8~ppa2~natty3) –  Rinzwind May 5 '11 at 12:34
1  
no you just need the amd64 branch. see my last link (both amd and i386 are there). Weird. This should 'just work'. –  Rinzwind May 5 '11 at 12:49
2  
OK, it does now. I think an earlier attempt to install python2.5 directly from LaunchPad screwed up the apt database. After running sudo apt-get -f install, everything worked. Thanks for your help! –  Josh Glover May 5 '11 at 12:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.