How to Install Python 3.9 on Ubuntu 20.04, Linux Mint 20

How to Install Python 3.9 on Ubuntu 20.04, Linux Mint 20

  • Python
  • 576 Views

Python 3.9 is the latest major release of the Python language. It includes many new features such as new dict operators, new str functions, support for IANA time zone, and many more

In this article, we’ll show you two ways to install Python 3.9 on Ubuntu 20.04.  with Apt

 

Step 1: Update and Refresh Repository Lists

To make sure that our versions are up-to-date, open a terminal window, and enter the following:

sudo apt update

 

Step 2: Install Supporting Software

The software-properties-common package gives you better control over your package manager by letting you add PPA (Personal Package Archive) repositories. Install the supporting software with the command:

sudo apt install software-properties-common

 

Step 3: Add the deadsnakes PPA  to your system’s sources list:

sudo add-apt-repository ppa:deadsnakes/ppa

When prompted, press [Enter] to continue.

then refresh the package list again

sudo apt update

 

Step 4: Install Python 3.9

you can install Python 3.9 by executing the following command

sudo apt install python3.9

 

Step 5: Verify the installation

Verify that the installation was successful by typing:

python3.9 --version

OR 

python3.9 -V

 

Output
Python 3.9.5

 

That’s it. Python 3.9 is installed on your Ubuntu, and you can start using it.