Update Python 2.7 to latest version of 2.x
66,576
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
Related videos on Youtube
Author by
Morgoth
Updated on September 18, 2022Comments
-
Morgoth over 1 year
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.-
David Foerster over 6 yearsI'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.
-
Eliah Kagan over 6 years@DavidFoerster Done. We can vote to close that question as a duplicate of this one now, which I've done.
-
Morgoth over 6 years@dbliss This is normal practice on stackexhange.
-
Eliah Kagan over 6 yearsI'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 Ask Ubuntu Meta than in comments or chat.
-
-
Igor Pomaranskiy about 8 years
Error: 'fkrull/deadsnakes-python2.7' invalid
-
Igor Pomaranskiy about 8 yearsIt should be
sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7
(you've missedppa:
). -
zhihong over 7 yearsThanks. But it works till python 2.7.12, now the latest release is 2.7.13.
-
Enrico about 7 yearsImportant The mentioned repository won't receive any further updates.
-
giorgiosironi almost 7 yearsIt appears this PPA has now been taken offline, launchpad.net/~fkrull/+archive/ubuntu/deadsnakes-python2.7 403
-
cmp about 6 yearsYou can use it now from launchpad.net/~deadsnakes/+archive/ubuntu/ppa but it doesn't support 2.7 releases
-
Gaia almost 6 yearsseems that
jonathonf/python-2.7
doesn't carry the packages for bionic -
Morgoth almost 6 years@Gaia, Try
sudo apt install python-minimal
, it looks like the new way to do it. I has a newer version of python 2.7 thanppa:jonathonf/python-2.7
too. -
Filip Savic almost 6 yearsI am using Ubuntu 14.04. Just did as the answer says for my version (17.04 and older) and I just got Python 2.7.14 which is newest version of python 2 today (15.8.2018.). Thanks! :)
-
Moshe Zvi about 4 yearsUnfortunately, this is no longer working as of May 2020
-
Morgoth about 4 years@MosheZvi What version of Ubuntu are you using?