What's the default Python version in Ubuntu 20.04?

What's the default Python 3 version in the new Ubuntu 20.04? Is it still 3.6 or the latest Python 3.8?

I'm developing a Python program that I later want to run on the new Ubuntu 20.04. I'm unsure if I can use the latest Python 3.8 syntax. I don't have Ubuntu 20.04 installed yet to quickly check it, and I couldn't easily find the answer to this question on Google.

1

4 Answers

Ubuntu 20.04 has Python 3.8.2 as the default version. Python 2.7 has been moved to universe and is not included by default in any new installs. Official Release Notes about Python

If you want to find the default Python 3 version of any Ubuntu release, you can run the command

rmadison python3
 python3 | 3.2.3-0ubuntu1 | precise | all python3 | 3.2.3-0ubuntu1.2 | precise-updates | amd64, armel, armhf, i386, powerpc python3 | 3.4.0-0ubuntu2 | trusty | amd64, arm64, armhf, i386, powerpc, ppc64el python3 | 3.5.1-3 | xenial | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x python3 | 3.6.5-3 | bionic | amd64, arm64, armhf, i386, ppc64el, s390x python3 | 3.6.7-1~18.04 | bionic-updates | amd64, arm64, armhf, i386, ppc64el, s390x python3 | 3.8.2-0ubuntu2 | focal | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x python3 | 3.8.6-0ubuntu1 | groovy | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x

Alternatively, check the package

For groovy (Ubuntu 20.10), it's Python 3.8.6:

enter image description here

1

According to the Ubuntu 20.04 release notes:

Ubuntu 20.04 LTS comes with a refreshed state-of-the-art toolchain including new upstream releases of glibc 2.31, OpenJDK 11, rustc 1.41, GCC 9.3, Python 3.8.2, ruby 2.7.0, php 7.4, perl 5.30 and golang 1.13.

Manifest file

Another thing you can do for any Ubuntu version and any package is to check the manifest file which lists all preinstalled packages in the image:

It contains python3.8 but nothing that seems python2 related.

See also: How do I list the default installed packages?

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like