Ubuntu is the most popular Linux distribution whereas Python is one of the most popular and commonly used high-level programming languages in the world. It’s easy to use, powerful and can be used in various domains such as web development, and data science. In Ubuntu 20.04, we already have Python 3.8 pre-installed so we don’t need to do anything else besides start using it. Python 3.8 is the last release at the time of this answer but if you want to experiment with the latest pre-release alpha version of Python which Python 3.9, you can use the deadsnakes PPA.
How to Install Python 3.9 on Ubuntu 20.04
You can install Python 3.9 by executing the following commands in your terminal.
$ sudo apt update $ sudo apt install software-properties-common
Next, add the `ppa:deadsnakes/ppa` PPA as follows:
$ sudo add-apt-repository ppa:deadsnakes/ppa
Hit enter when prompted.
Next, install Python 3.9 version using the following command:
$ sudo apt install python3.9
That’s it, you can now start using Python 3.9 in your Ubuntu 20.04 machine.