How To Install Python 3.9 on Ubuntu | Linux Mint

Python is a very powerful high-level programming language that has seen extensive adoption in modern applications development. Python programs are remarkably easy to write when compared to other programming languages. There are lots of resources that can help you start your Python programming journey. In this article you’ll learn to install Python 3.9 on Ubuntu and Linux Mint system.

Install Python 3.9 on Ubuntu | Linux Mint

As of this article writing the latest release version of Python is 3.9. The latest packages of Python are not usually available on the OS upstream repositories. We will be installing Python 3.9 on Ubuntu – Linux Mint by building the application from source code.

The first step will be to update the system and upgrade all system packages.

sudo apt update
sudo apt -y upgrade

Once the upgrade is done reboot the system to boot to the newest kernel that might have been installed during upgrade.

sudo reboot

Also install some dependencies on the system.

sudo apt install wget build-essential software-properties-common -y

Add Python PPA repository

The latest packages of Python for Ubuntu and its derivatives such as Linux Mint are available in deadsnakes PPA repository.

Let’s add the repository to our system by running the following commands:

sudo add-apt-repository ppa:deadsnakes/ppa

Just hit the enter key to agree to repository addition.

The package sources are available at:

Nightly Builds

For nightly builds, see ppa:deadsnakes/nightly
 More info:
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Hit:1 focal-security InRelease
Get:2 focal InRelease [265 kB]
Get:3 focal InRelease [18.1 kB]
Hit:4 focal-updates InRelease
Hit:5 focal-backports InRelease
Get:6 focal/main amd64 Packages [17.7 kB]
Get:7 focal/main Translation-en [4368 B]
Fetched 305 kB in 1s (381 kB/s)
Reading package lists... Done

Install Python 3.9 on Ubuntu | Linux Mint

Once the repository is added start installation of Python 3.9 on Ubuntu | Linux Mint.

sudo apt update 
sudo apt install python3.9 

Accept installation prompt using the y key in your keyboard.

Suggested packages:
  python3.9-venv python3.9-doc binfmt-support
The following NEW packages will be installed:
  libpython3.9-minimal libpython3.9-stdlib python3.9 python3.9-minimal
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 4819 kB of archives.
After this operation, 19.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Confirm Python version.

$ python3 -V
Python 3.8.5

We’ve finally installed Python 3.9 on Ubuntu and Linux Mint from a PPA APT repository.

See also  How to terminate programs on Linux using the kill command

Source link

Originally posted 2020-12-25 16:50:17.

About wahyuway

Check Also

How To Deploy Droplet on DigitalOcean With Terraform

Hello good people. In today’s blog post we will be showing you how to create …

Leave a Reply