This comprehensive Linux guide expects that you run the following commands as root user but if you decide to run the commands as a different user then ensure that the user has
sudo
access and that you precede each of the privileged commands withsudo
pip is a standard package-management system used to install and manage software packages written in Python. Many packages can be found in the default source for packages and their dependencies — Python Package Index. Most distributions of Python come with pip preinstalled.
In this tutorial, we will guide you about how to install Python pip on your Debian 9 system. Follow the instructions below.
Updating Packages Repository
Before installing pip on your Debian 9, you need to update your repository database by running the following command
root@codesposts:~$ apt update
Installing Python2 pip
To install Python2 pip on your debian 9 system, you need to run the following command
root@codesposts:~$ apt install python-pip
Verifying The Installed Version
After installing the pip, you can verify the version of the pip installed by running the following command
root@codesposts:~$ pip --version
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
Installing Python3 pip
To install Python3 pip on your debian 9 system, you need to run the following command
root@codesposts:~$ apt install python3-pip
Verifying The Installed Version
After installing the pip, you can verify the version of the pip installed by running the following command
root@codesposts:~$ pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.7)