Pip is a python package manager. Python packages and libraries can be installed in different ways to the system. We can also use the distribution provided package manager to install Python libraries. Python packages can get from pypi.python.org . How can we install pip in Debian, Ubuntu, Kali, or similar dpkg, apt-based distributions.
“Command ‘pip’ not found, but can be installed with:” Error
If pip
is not installed in the current system we will get an error like below.

We can see that the pip
can be installed with the following command. But keep in mind that this will install pip command for the Python version 2 or Python2. We can explicitly specify that we want to install pip3 or pip for Python 3.
$ sudo apt install python-pip

OR with the following command, we can install pip for Python3. As we can see that the package name for the Python3 Pip is python3-pip
$ sudo apt install python3-pip

If we want to get more information about the Pip package for the Python3 before the installation we can list python3-pip
package information with the apt shown
command like below.
$ apt show python3-pip

We can see that this will list Python3 Pip package information like Package Name
,Pip Version
which is 9.0.1. in this case. Section
,Source
, Origin
, Maintainer
, Installed Size
, Dependencies
etc.
Install Pip2 For Python2
We assume that distribution default Python version 2. This makes the keyword by default Python2. So we can just use the following command.
$ sudo apt-get install python-pip
Show Pip Version For Python2
As Python is a dynamic language and provides updates about libraries pip
will also get updates. This will cause pip
version to change. We can print the current version of the pip
command with the --version
option like below.
$ pip -V
$ pip --version
OR
$ pip3 -V
$ pip3 --version
OR
$ pip2 -V
$ pip2 --version

Print Help For Pip
More information and help about pip
can be printed with the --help
option like below.
$ pip --help

“Command ‘pip3’ not found, but can be installed with:” Error
If pip
is not installed in the current system we will get an error like below.

Install Pip3 For Python3
Pip3 is a package manager for specifically Python3. So Python2 and Python3 package managers are different. How can we install Pip3 into Ubuntu, Debian, Kali, or related dpkg or apt distros like below.
$ sudo apt install python3-pip
Show Pip3 Version For Python3
Python3 is a dynamic language and provides updates about libraries pip3
will also get updates. This will cause pip3
version to change. We can print the current version of the pip3
command with the --version
option like below.
$ pip3 --version

As we can see that the current version of Python is 3.6
and pip version is 9.0.1
.
Print Help For Pip3
We can print help information about the pip3
with the --help
an option like below.
$ pip3 --help

We can see that the installed pip3
command provides the following options or commands.
install
is used to install a Python or Pip Package-
download
is used to only download a Python or Pip Package -
uninstall
is used to uninstall or remove a Python or Pip Package -
list
is used to list all installed a Python or Pip Package -
show
is used to show detailed information about a Python or Pip Package -
search
is used to search a Python or Pip Package
Install Package with Pip For Python2
After installation of the pip
package is complete we can install packages by using pip
command. In this example, we will install the popular web framework named Django
with pip command.
$ pip install django
Install Package with Pip3 Command For Python3
We can also install new packages with pip3
command we will install the Django
package with pip3 command.
$ pip3 install django


thanks man 🙂
this article realy help me. Thanks again for sharing your knowledge with us.
Thank you so much. This is the only solution that worked for me.
Thanks a lot for your help