The open blogging platform. Say no to algorithms and paywalls.

How to Install Python 3.9 on Ubuntu

Python is a robust and most popular programming language. In the last five years, python has grown by 19.1% share worldwide becoming the world's most used and popular (30.8% share) programming language.

Apart from these stats, the heart of Python lies in its efficient memory management. It covers almost every application ranging from software development to Artificial Intelligence.

Recently, the python 3.9 stable version has been released that has multiple new functionalities and various security updates.

In this tutorial, we will be installing the newly released Python3.9 version on our ubuntu machine. So let us get started.

Deadsnakes is the team that provides the PPA for the recently released python version for ubuntu. So we will use this repository for installing our python 3.9 version.

1. Pre Configuration

Open up the terminal with the command Ctrl+Alt+T and then hit the following commands for updating the system.

$ sudo apt update\
$ sudo apt install wget software-properties-common

2. Add Deadsnakes PPA repo in the system

Now we have to add and register the deadsnakes repository to our Ubuntu system. For that enter the following commands in your terminal.

$ sudo add-apt-repository ppa:deadsnakes/ppa

3. Update the apt-cache and Install Python 3.9

Now after we have added the PPA in our ubuntu system, we have to update our apt-cache and finally install the new version of python.

$ sudo apt update\
$ sudo apt install python3.9

3. Check Out the New Version

Now wait for the installation and check out the new version with the following command:

$ python3.9 --version\
 Python 3.9.0

And that's it!




Continue Learning