27

The version of python2 on my Ubuntu 14.04 machine is Python 2.7.6. How can I upgrade it to the the latest version of Python 2.X? The latest is currently 2.7.11.

I have tried apt-get update/upgrade, but the repository doesn't seem to have the latest version.

Zanna
  • 72,471
Morgoth
  • 1,893
  • 2
  • 22
  • 29
  • 4
    I'm voting to reopen this question because the answer to the linked question is obsolete while this one is up to date (as far as I can tell). They should either be merged or the duplicate relationship should be reversed. – David Foerster Nov 17 '17 at 11:37
  • @DavidFoerster Done. We can vote to close that question as a duplicate of this one now, which I've done. – Eliah Kagan Nov 17 '17 at 14:45
  • 1
    @dbliss This is normal practice on stackexhange. – Morgoth Nov 17 '17 at 16:07
  • 1
    I've removed some of my comments so any future comments will more likely be seen, and to reduce distraction from the actual Q&A here. Anyone interested may read them, in context and with continued discussion, in this chat room (transcript). I reiterate, however, that any serious concerns are better discussed--and far more likely to be resolved--on [meta] than in comments or chat. – Eliah Kagan Nov 17 '17 at 18:01

1 Answers1

34

Ubuntu 18.04 and newer:

The new version of Ubuntu no longer uses python 2, so you need to install it with:

sudo apt install python-minimal

Ubuntu 17.04 and older:

The answer appears to be to add a third party repository:

sudo add-apt-repository ppa:jonathonf/python-2.7
sudo apt-get update
sudo apt-get install python2.7
python --version
Morgoth
  • 1,893
  • 2
  • 22
  • 29