Fixed Pip Command not found and install pip in Linux

In Ubuntu or any Linux distros, we use package managers to install programs. The same is true for Python, Python uses pip or pip3 as the package manager.

If python version 2 is being used then pip is used as a package manager, however, if python version 3 is being used then pip3 is used as the package manager. So here is the fix for pip command not found with their supported versions.

PIP command not found

This error occurs if you have not installed the PIP package manager in your Python installation. Sometimes even the PIP package manager can be corrupt. So you can try installing PIP and it should fix pip command not found error.

Installing PIP

Depending on your Linux distro enter the command below to install PIP.

Install PIP in Debian/Ubuntu

sudo apt install python-pip                            #Pyhton 2
sudo apt install python3-pip                          #Python 3

Install Pip on CentOS and RHEL

you will need to add EPEL repository first, so enter the commands below to install PIP in CentOS and RHEL.

yum install epel-release
yum install python-pip

Install PIP on Arch Linux

pacman -S python2-pip                             #Python 2
pacman -S python-pip                               #Python 3

Install PIP on Fedora

dnf install python-pip                               #Python 2
dnf install python3-pip                             #Python 3

Enter the above command (depending on your system OS) in the terminal and this will fix pip command not found error. As it will install PIP on your Linux system.

After installation of PIP, you can verify it’s a successful installation with the command below.

pip -V

This command shows the version of PIP after a successful installation.

What is the use of PIP?

PIP ( Pip install packages) is the package manager for Python. It helps in installing code libraries also known as modules. When you install a module you can directly import that module in your python project.

These Modules helps in organizing the code as well as prevent from rewriting the code. As you can store your code in the form of modules as well as install already available modules from python library.

If you have installed PIP and want to upgrade it to the latest version use the command below.

pip install -U pip

We hope it fixes the problem. Here is how you can install deb files in Linux.

3 thoughts on “Fixed Pip Command not found and install pip in Linux”

Leave a Reply

Share via
Copy link
Powered by Social Snap