How to Install Pip on Debian 10

How to Install Pip on Debian 10
How to Install Pip on Debian 10

Install PIP on Debian 10

PIP stands for Python Package Index (PyPI) used for the installation and management of software packages in Python. PIP makes it very easier to install packages in Python. Now you are going to install PIP on Debian 10 and you will also learn some basic commands in PIP.

Prerequisites

Before you start to install PIP on Debian 10. You must have a non-root user account on your server with sudo privileges.

1. Install PIP for Python 3

Before start installing PIP on Debian, you should update the package index by entering the following.

sudo apt update

Now to install PIP on Debian enter following command

sudo apt install python3-pip

To confirm installation and check the version of PIP enter following command

pip3 --version

The output should be :

Output:
    pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

If output comes as above then you have successfully installed PIP on Debian.

NOTE – the version number of PIP may change with time.

2. Install PIP For Python 2

Update the package manager index by entering following command

sudo apt update

After updating the package manager index to install PIP for Python 2 enter following in a terminal

sudo apt install python-pip

Check version and confirm installation by entering the following

pip --version

The output should be :

Output
    pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

3. Basic usage of PIP for python 3

To list all the commands in PIP enter following

pip3 --help

Get information of specific command enter following

pip3 install --help

To search package with PIP enter following

pip3 search PACKAGE_NAME

Install package with PIP enter following in the terminal

pip3 install PACKAGE_NAME

To install package from requirements file

pip3 install -r requirements.txt

Upgrade package with PIP

pip3 install --upgrade PACKAGE_NAME

Uninstall package with PIP

pip3 uninstall PACKAGE_NAME

4. Basic usage of PIP for python 2

To list all the commands in PIP enter following

pip --help

Get information of specific command enter following

pip install --help

To search package with PIP enter following

pip search PACKAGE_NAME

Install package with PIP enter following in the terminal

pip install PACKAGE_NAME

To install package from requirements file

pip install -r requirements.txt

Upgrade package with PIP

pip install --upgrade PACKAGE_NAME

Uninstall package with PIP

pip uninstall PACKAGE_NAME

Conclusion

Here you have learned how to install PIP on Debian 10 for python 3 and python 2. If you have any queries regarding this please don’t forget to comment below.

LEAVE A REPLY

Please enter your comment!
Please enter your name here