Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My project needs to stay current on Python releases, but 12.04LTS is currently stuck on 2.7.3, even though 2.7.5 is out now. Is there a way I can stay more current without manually compiling? We're required to stay on package-based installation for Python. What's the "right" way to handle this?

Thanks!

share|improve this question

1 Answer 1

up vote 3 down vote accepted

EDIT: As @Anthon has pointed out in the comments, this PPA does not include Python 2.7 for Ubuntu 12.04 (Precise). See options 1 and 2 at the bottom for alternative solutions.

The preferred "Ubuntu" way to deal with packages not included in their universe by default is to use a PPA (third part repository), rather than manually compiling. You maintain the benefits of package management, updates, and dependency resolution this way.

However, the third party repositories are NOT officially supported, if that is part of your requirement.

The DeadSnakes (get it) PPA maintains Python releases not included in the systems package management.

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

You can read more about this PPA here.

However, in your case this does not include Python 2.7, as DeadSnakes only provides major versions not included and not point releases. As Ubuntu already packages 2.7 for Ubuntu 12.04, DeadSnakes will not provide this.

It might be preferable for you to make the case that you should not use the native packaging with Ubuntu in this case. See this excerpt from DeadSnakes;

Using third-party modules packaged for Debian or Ubuntu with the Python
interpreters from this repository is a bit of a mixed bag. For Python 2, Python
modules from the official repositories will not work, as a consequence of how
Python packaging works in Debian. For Python 3 on the other hand, all
pure-Python module packages at least should be available; compiled extension
modules will not work however.

In general, you're better off installing Python modules using the common Python
packaging tools rather than the system package manager. For an introduction into
the Python packaging ecosystem and its tools, refer to;
    http://guide.python-distribute.org/

A few of these tools might also be provided in this repository as a convenience.

If you are absolutely required to use the operating systems package management, and are unable to move to a different version of Ubuntu with a package provided by DeadSnakes, or natively, than you only have two options left, as I see it.

  1. You could request a backport of Python 2.7.5 to Ubuntu 12.04.
  2. You could create your own PPA with the version of Python you require.

side note: AskUbuntu is a better StackExchange to post stuff like this to, than SuperUser generally.

share|improve this answer
    
Perfect, thanks! In your experience, is DeadSnakes well maintained? –  Will Jun 4 '13 at 6:24
1  
Yes, it does seem to be popular and well maintained. I'd have little reservation using it. –  krondor Jun 8 '13 at 13:09
    
It only has 2.7.4 for 10.04 not for 12.04 –  Anthon Jun 10 '13 at 12:20
1  
@Anthon you are correct, I didn't notice that. DeadSnakes will not replace a major release, so since Ubuntu already bundles Python 2.7, Deadsnakes will not provide point releases for that series. Rather they provide 3.3 for Precise. This will not help the OP in this case. –  krondor Jun 13 '13 at 17:45

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.