How to update Python to the latest version on Ubuntu 18.04
247,833
Python 3.7.1 is still in maintenance version.
It is only available for download to Windows and macOS users. Once the stable version is released, then it is made available in Linux repositories.
For Windows and Mac users visit this python.org URL.
For Linux users: you can download the 3.7.0 version from the terminal
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install python3.7
Author by
Ahmed Ashraf
Updated on September 18, 2022Comments
-
Ahmed Ashraf over 1 year
The current version of python I've now which is installed by default with Ubuntu is 2.7rc1 ,
Is it possible to update it officially to the latest version (3.7.1) ?
Thank You .-
Admin over 5 yearsPython 3.x is contained in the package called "python3". Currently, it looks like it is version 3.6.5. You can have this package and Python 2 co-existing.
-
Admin over 5 yearsWhat are the results of
python3 -V
? They should show that you already have Python 3.6.6 installed in 18.04. -
Admin over 5 years@Ray I think you should change your comment to an answer to the question
-
Admin over 5 yearsThanks for your attention, I'm a new Ubuntu user, Can you please explain in detail what should I exactly do ?
-
Admin over 5 yearsYou should read the duplicate question link. Asking us to "explain in detail" something that we have already explained in detail seems a bit...um....
-
Admin over 5 years@AhmedAshraf I hope what I said below helps. But, if you're a new Ubuntu user then I don't suggest you dive into the latest Python. I think for your needs, any Python 3.x will do. If you reach a stage where you're more familiar with Ubuntu and the latest version in the repository isn't good enough for you, then you can consider the latest release. I presume when you reach that stage, you are purposely after features in 3.7.1 that isn't in 3.6.5 . If you don't know (or care) about the difference, then below should help you.
-
Admin over 5 years@karel It is possible that someone does not have Python 3 installed. Unlikely but possible. But I added information about locating the Python 3 executable in my answer. Thanks!
-
Admin over 5 years@user535733 I'm sorry for this, I already read the duplicate question and there was some terms I didn't understand like ( apt-get, source tar ball, pseudo package, PPA , ... etc ), But I followed the instructions in the answer below and everything is fine now, Thank you :)
-
Admin over 5 years@AhmedAshraf You're welcome! Unfortunately, I wrote a slightly longer reply in response to your query for more information, but it got deleted by moderators. But I'm glad you were able to get the information you needed!
-
-
Mohammad Heydari over 5 yearsit worked on my UBUNTU 18.4 LTS
-
Santropedro almost 5 yearsThere is a newer python stable now than this answer.
-
baldy about 4 yearsjust change the second command to the latest stable version instead of python3.7, currently 3.8