How to install PIP on Ubuntu 18.04

Install PIP on Ubuntu 18.04

In this tutorial we’ll learn how to install PIP on Ubuntu 18.04. We will also install and configure its prerequisites. Pip is a package management tool for utilized to set up and manage Python packages. Python is an open-source, multi-platform and popular programming language using a design philosophy which highlights on code readability. Since it’s more focus on readability, it’s regarded as a simple programming language.

I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 18.04 LTS minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install PIP on Ubuntu 18.04

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

apt-get update -y
apt-get upgrade -y

Step 2. Installing Pip on Ubuntu 18.04.

Open Terminal and execute the following command to install pip and all its dependencies:

sudo apt install python-pip

Once the installation is finished, you can verify whether it is successfully installed or not by running the following command:

pip --version

Install PIP3 for Python:

sudo apt update
sudo apt install python3-pip

Step 3. How to install packages using Pip.

To search PyPI (Python Package Index) for specific package you can use the following command:

pip search package_name

Once you are ready to install specific package you can use the following command:

pip install package_name

To uninstall any package, run the following command:

pip uninstall package_name

Running pip –help will give you a list of useful commands you can run with pip and a brief explanation of those commands:

pip --help

Congratulation’s! You have successfully install and configured PIP on your Ubuntu 18.04 server. Thanks for using this tutorial for installing Pip tool for installing and managing Python package on Ubuntu 18.04 LTS (Bionic Beaver) system.