IBepyProgrammer

Getting Started with Python On Linux

1 min read
Getting Started with Python On Linux

Install Python on Linux

For this section, we will be using the Ubuntu Linux distro.

First, navigate to show applications, and on the search bar, search for “terminal” and execute the terminal.

On the terminal, follow the installation steps as follows:

  • Step 1: Type “sudo apt install python3” and run the command. You will be prompted to enter the root password. After you enter the password, python will be installed via the terminal.

  • Step 2: We then install pip by typing “sudo apt install python3-pip” in the terminal. Note that pip allows the user to install and manage Python packages.

  • Step 3: Wait for the installation process to complete.

Verify Python is installed.

Inside the terminal, we can verify that Python is installed by:

  • Step 1: Type “python3” and press enter. This will show the version of Python installed on your Ubuntu distro.

  • Step 2: We can then write our first Python code by typing: print("Hello World!") and press Enter.

Now, we installed Python in just a few commands on our Linux (Ubuntu) distribution through the terminal.

Sign up for our newsletter

Don't miss anything. Get all the latest posts delivered to your inbox. No spam!