How to Install Pip on Ubuntu 18.04 Bionic Beaver

In this article, we will have explained the necessary steps to install and configure Pip python on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Pip stands for “Pip Installs Packages”. Pip is a command line based package management system. It is used to install and manage software written in Python language.

Install Pip on Ubuntu 18.04

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

sudo apt update
sudo apt upgrade

Step 2. Install PIP on Ubuntu.

  • Installing pip for Python 3.
sudo apt update
sudo apt install python3-pip

Once the installation is complete, verify the installation by checking the pip version:

pip3 --version
  • Installing pip for Python 2.
sudo apt update
sudo apt install python-pip

Verify the installation by printing the pip version number:

pip --version

Step 3. Basic usage of PIP.

  • Basic usage of PIP for python 3

To list all the commands in PIP enter following

pip3 --help

Get information of specific command enter following

pip3 install --help

To search package with PIP enter following

pip3 search PACKAGE_NAME

Install package with PIP enter following in terminal

pip3 install PACKAGE_NAME

To install package from requirements file

pip3 install -r requirements.txt

Upgrade package with PIP

pip3 install --upgrade PACKAGE_NAME

Uninstall package with PIP

pip3 uninstall PACKAGE_NAME
  • Basic usage of PIP for python 2

To list all the commands in PIP enter following

pip --help

Get information of specific command enter following

pip install --help

To search package with PIP enter following

pip search PACKAGE_NAME

Install package with PIP enter following in terminal

pip install PACKAGE_NAME

To install package from requirements file

pip install -r requirements.txt

Upgrade package with PIP

pip install --upgrade PACKAGE_NAME

Uninstall package with PIP

pip uninstall PACKAGE_NAME

That’s all you need to do to install Pip python on Ubuntu 18.04. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.