How to Install Python on Ubuntu / Python for Ubuntu

How to Install Python on Ubuntu
  1. Open up your terminal by pressing Ctrl + Alt + T.
  2. Update your local system's repository list by entering the following command: sudo apt update.
  3. Download the latest version of Python: sudo apt install python3.
  4. APT will automatically find the package and install it on your computer.

How to Check if Python Is Installed on Your System

Python is a powerful, high-level scripting language used by many developers around the globe. The language is ideal for a variety of real-world applications including web development, web scraping, and penetration testing. You can even build a Telegram bot using Python.

To check if Python is installed on your system or not, open up your terminal by pressing Ctrl + Alt + T. Type in “python3” and press Enter.

If you see the following output in your terminal, then you have Python installed on your Ubuntu machine.

Python 3.11.0a7 (main, Apr 20 2022, 17:44:14) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

This output provides information on the version of Python installed on your system along with the current date and time.

On the other hand, if you see an error that states “bash: python3: command not found,” then sadly your Ubuntu system doesn’t have Python installed.

You can also check for the Python version by simply typing the following command in your terminal:

python3 --version

The output will give you details on which version of Python is currently installed on your computer.

How to Install Python on Ubuntu

Installing Python on Ubuntu is easy. You can get the latest version of Python from multiple sources. Here are some of the recommended ways to do the same:

Install Python Using APT

APT, or Advanced Package Tool is the default package manager that you will find on Ubuntu. You can download the Python package from the official Ubuntu repository. Here’s how to do it:

  • 1. Open up your terminal by pressing Ctrl + Alt + T.
  • 2. Update your local system’s repository list by entering the following command:sudo apt update
sudo apt update
  • 3. Download the latest version of Python:sudo apt install python3
sudo apt install python3

4. APT will automatically find the package and install it on your computer.

Leave a Comment