How to Install Python on Ubuntu using Terminal?

24-Jun-2023

.

Admin

How to Install Python on Ubuntu using Terminal?

Hello Friends,

In this example, I will show you how to install Python on Ubuntu using the terminal. This post will give you a simple example of installing Python in Ubuntu using the terminal. We will look at an example of a step to install Python using the terminal. We will use how to install Python from the terminal.

This guide shows simple ways to install Python 3.9 on Ubuntu 20.04. If you want to install Python 3.9 on Ubuntu 18.04, you can follow the same steps provided below for Ubuntu 18.04 and all Ubuntu-based distributions, including Kubuntu, Linux Mint, and Elementary OS.

Step 1: Open Terminal OR Command Prompt


First of all, your terminal or command prompt by pressing the Ctrl+Alt+T key:

Step 2: Update APT Package

In this step, visit your terminal and execute the following command to update the Apt package list:

sudo apt update

sudo apt install software-properties-common

Step 3: Add the deadsnakes PPA

In this step, execute the following command on your terminal to Add the dead snakes PPA:

sudo add-apt-repository ppa:deadsnakes/ppa

When prompted, press [Enter] to continue.

Step 4: Install Python 3.9

In this step, execute the following command on your terminal to install Python 3.9 on Ubuntu:

sudo apt install python3.9

Step 4: Verify Python Installation

In this step, execute the following command on your terminal to verify Python 3.9 installation on Ubuntu 20.04:

python3.9 --version

Output will be:

Python 3.9.1+

Note that The easiest way is to install Python on Ubuntu 20.04.

I hope it can help you...

#Ubuntu