Python is a trending, popular, and high-level programming language. You can build different types of applications using Python. There are different frameworks released by Python. These frameworks are used to create different types of applications. Such as Web applications, Blockchain applications, Command line applications, Game app development, Machine learning application, and many more. Everywhere you will find Python development. If we will talk about the installation of Python then it is super easy for Windows. But if you are on Linux distribution then that is not such an easy step for you.
Prerequisites
Before starting the installation, you must have the below requirements.
- Ubuntu 20.04.2 or later version (As an Operating System)
- An Ubuntu user with Sudo Privileges
- A terminal and command-line access
Install Python in Ubuntu
To proceed with the installation, at the initial step, open the terminal. Then check the Python version using the below command.
python --version
OR
python3 --version
If it is not installed already then it will throw not found as shown below.
How to Install and Use Sticky Note in Linux Ubuntu 21
So, you have to proceed with the next step.
Update and Refresh Ubuntu Repository List
Open the terminal and hit the below command.
sudo apt update
This will take a couple of seconds to check the packages.
Install Supporting Software to Install Python
To install python in Ubuntu, you will have to add its repository first. So, add it using the command.
sudo apt install software-properties-common
How to Install and Configure TeamViewer in Ubuntu 21.10
Add Deadsnakes PPA
In the next step, you will have to add the Deadsnakes. The Deadsnakes is a PPA with newer releases than the default Ubuntu repositories. You can add the PPA by entering the below command.
sudo add-apt-repository ppa:deadsnakes/ppa
While adding, it will prompt a confirmation. So, you have to allow that to proceed with the installation.
After that, you have to refresh the Ubuntu repository package.
sudo apt update
Next, we will install Python.
How to Install and Use FileZilla FTP Client in Ubuntu 21.10
Install Python in Ubuntu
You can specify the version as well while installing. So, hit the below command in the terminal.
sudo apt install python3.10
It will ask for confirmation while installing. Allow it to finish the installation.
Once the installation is finished, you can check the version.
How to Install and Use Postman in Ubuntu 21.10
Check Python Version
For checking the Python version, hit the below command.
python3 --version
That’s it for this post. You can start writing Python scripts. Thank you.
Leave a Reply