Python is a popular programming language among beginners and experienced developers. According to SlashData, there are now 8.2 million developers in the world who code using Python. In this tutorial, I am going to explain step by step guide to install Python 3 on Ubuntu. So let’s get started.
Install Python 3 on Ubuntu Step by Step
System Requirements
- A system running Ubuntu (Latest Version)
- A user account with sudo privileges
- Access to a terminal window/command-line
- Make sure your environment is configured to use Python 3.9
Installing Python 3.9 on Ubuntu with Apt
Most of the Ubuntu distribution comes with preinstalled Python. Check your already installed version using following command on the terminal.
$ python ––version
Now, to install Python 3.9 on Ubuntu follow the below steps.
Step 1: Update the Ubuntu packages list.
$ sudo apt update
$ sudo apt install software-properties-common
Step 2: PPA add to the deadsnakes PPA
Now, you have to add python PPA to the apt repository.
$ sudo add-apt-repository ppa:deadsnakes/ppa
Press Enter on the keyboard to proceed the PPA add.
Step 3: Install Python 3.9 from Command Line
After adding PPA to the repository, update the repository again. Then install Python 3.9
$ sudo apt update
$ sudo apt install python3.9
Step 4: Verify the Python Installation and check Python version.
To verify the Python installation on Ubuntu. Run following command to check Python version.
$ python3.9 --version
Conclusion
In this article, you have learned how to install Python 3 on Ubuntu. Follow the article thoroughly to install Python. If you like this article, please feel free to share it on your social media.