How to Install Pip on Ubuntu 20.04

pip

In this project, we will install pip. Pip makes it easy to manage software packages written in Python.

You Will Need

Directions

Log in to your Ubuntu Linux machine.

Click on the nine white dots in the lower left of the desktop.

1-six-dots

Type “terminal” in the search blank, and then click on the Terminal icon.

2-terminal-search-blank

Before we install anything, let’s make sure we have the latest list of available packages. Let’s also upgrade the system if necessary.

Type the following command in the terminal window:

sudo apt update

You’ll need to type your password and then press Enter.

Now, let’s upgrade our system.

sudo apt -y upgrade

The -y flag means that we agree to upgrade our system to the latest and greatest software packages.

Now, we need to install pip. Type the following command and press Enter:

sudo apt install -y python3-pip

Pip should take a minute or two to install.

If at any time you want to install a Python package, you use the following command:

pip3 install package_name

You’ll need to replace package_name above with the name of the library or package you want to have installed.

For example, let’s install some mathematical packages. We will install numpy (scientific computing library), scipy (scientific computing library), matplotlib (graph plotting library), and sympy (computer algebra library).

Here is the command you need to type into the Terminal:

pip3 install numpy scipy matplotlib sympy
4-install-math-packagesJPG

That’s it!