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

Linux and Opensource world mainly uses 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

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

OR

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

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 following command.But easy_install is provided by python-setuptools

$ sudo easy_install pip

OR

$ sudo easy_install pip3

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

 

Leave a Comment