Linux

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.

Akash

View Comments

Recent Posts

Linux Software must have to improve Productivity

You can utilize a wide range of tools as a Linux user to keep organized, manage your time, and become… Read More

1 year ago

How to get Complete details of an Audio Video File

Have you ever caught yourself in a situation where you need details of an audio/ video media file? When you… Read More

3 years ago

Fix Windows 10 showing wrong time in dual boot with Linux

If you have installed Linux alongside windows in the dual boot you might have noticed that every time you boot… Read More

3 years ago

How to update Linux Kernel to the latest version easily

Linux kernel is like the core of the operating system. It's a piece of software that works as a middle… Read More

3 years ago

3 Methods for How to Install Python on Linux System

Nowadays, most Linux Distros already have Python preinstalled. But you might have a distribution that might not have Python preinstalled.… Read More

3 years ago

How to Install Python on Windows 10 to begin coding

Python is one of the most popular and easy to learn programming languages. Its a widely used high-level programming language… Read More

3 years ago

Just so that you know we use cookies on our website. Want to know more

read here