“pip command not found” Error Solution Pip and Pip3 For Linux, Debian, Ubuntu, CentOS, Mint – POFTUT

“pip command not found” Error Solution Pip and Pip3 For Linux, Debian, Ubuntu, CentOS, Mint


Linux and opensource world mainly use package management software for installing, updating, and removing software. Python is using pip or pip3 for Python package management. pip is Python2 package manager where pip3 is Python3 package manager.

“pip command not found” Problem

Command “pip” is used to manage python packages and can be executed from the bash shell like below. We will get an error like pip command not found when we try to run pip  or pip3 like below.

$ pip search django
"pip command not found" Problem for Python2
“pip command not found” Problem for Python2

We can see from the screenshot that “pip” command is not executed and a message like “Command ‘pip3’ not found, but can be installed with: sudo apt install python-pip” is printed to the bash.

$ pip3 search django
"pip command not found" Problem for Python3
“pip command not found” Problem for Python3

We can see from the screenshot that “pip3” command is not executed and a message like “Command ‘pip3’ not found, but can be installed with: sudo apt install python3-pip” is printed to the bash.

Install pip Package For Python2 In Ubuntu, Debian, Mint, Kali

We will install Python2 pip package for deb based distributions like be Ubuntu, Debian, Mint and Kali. We can use this command for other deb based distributions as well.

$ sudo apt install python-pip
Install pip Package For Python2 In Ubuntu, Debian, Mint, Kali
Install pip Package For Python2 In Ubuntu, Debian, Mint, Kali

Install pip Package For Python2 In CentOS, RHEL, Fedora

We will install Python2 pip package for rpm based distributions like Fedora, CentOS, RHEL. We will install with the following command.

$ sudo yum install python2-pip
Install pip Package For Python2 In CentOS, RHEL, Fedora
Install pip Package For Python2 In CentOS, RHEL, Fedora

Install pip3 Package For Python3 In Ubuntu, Debian, Mint, Kali

We will install Python3 pip package for deb based distributions like be Ubuntu, Debian, Mint and Kali. We can use this command for other deb based distributions as well.

$ sudo apt install python3-pip

Install pip Package For Python2 In CentOS, RHEL, Fedora

We will install Python3 pip package for rpm based distributions like Fedora, CentOS, RHEL. We will install with the following command.

$ sudo yum install python3-pip

Install with easy_install

We can also use Python provided installation tool named easy_install . We will run the following command. But easy_install is provided by python-setuptools

$ sudo easy_install pip

OR

$ sudo easy_install pip3

Install Pip For MacOSX

MacOSX provides similar features to the Linux distributions. Pip also provided for the MacOSX operating system. We can install the pip command with following “brew” command.

$ brew install python

Print Pip2 and Pip3 Version

After installation we may need to get version information about the pip or pip3 or pip2 . We can use --version option to print detailed version and site-packages path.

$ pip --version
Print Pip2 and Pip3 Version
Print Pip2 and Pip3 Version

LEARN MORE  RabbitMQ Tutorial

Leave a Comment