Knowledge Base
MilesWeb / Web Hosting FAQ

Installing PIP on Ubuntu 18.04

Approx. read time : 3 min

This article includes steps to install PIP on Ubuntu 18.04.

Prerequisite :

Commands mentioned in this article are for Ubuntu 18.04 LTS server. We have logged in as a root user.

First of all, we need t to verify that the Python is installed :

Run the following command, to verify that Python is installed on your server :

This command checks the Python version and also verifies if Python 3 is installed on your Ubuntu system.

Type Ctrl+C to exit the Python shell.

# Install PIP

Start updating Ubuntu

Then, install PIP.

Now, check the version of your installed PIP, using the following command.

#Using cases

We have several options to use PIP.

Either we can stay within a virtual environment and test our programs within a distinct or virtual Python environment. Or, we can also run PIP globally, this can make a program to run on the server itself.

In this example, we are going to work on our projects within the virtual Python environment (by using venv) so that it will limit the interaction with other projects for their dependencies. Additionally, it will also avoid a huge conflict that can take place with the system’s default Python environment. We run the following code, to display all the available options for PIP :

Use pip –help to get more information about a specific PIP.

As an example, to get more information about the install command, type following command :

Use the following command, to search for a specific package :

Use the following command, to see all the installed packages :

Usually, the output shows a significant number of packages.

Use the following command, to install a package using PIP :

Run following command, to uninstall a package using PIP :

That’s it.

Also Read :

1) Installing Pip on Ubuntu 16.04 LTS

2) How to List and Filter Users in Linux

Sonam Wagh
With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.
Need help? We’re always here for you.
Register Your Free Domain Name
OFFER EXPIRES IN
04
min
59
sec