Today, we will show how you can install python-pip packages on the Debian 10 system through the command-line application. All commands of this article have been implemented on the Debian 10 buster environment. Almost all these steps can also be used on Ubuntu and Linux Mint operating environments.
Pip Installation on Debian 10 system
Python has two different versions, python2 and 3. However, you need to separately install python pip-tools for both python versions. Open the terminal from the application menu and then start the installation of a python-pip using the following method:
Install pip for python2
The following steps are included while you install the pip tool for python2 on Debian 10:
Step 1: Update system packages
Run the following command to update the system package list:
Step 2: Install Pip
First, ensure the installation of python2 on your system by running the following command:
The installed version will be displayed on the terminal. Now, type the following command to install the pip tool for Python2:
The above command will automatically install pip with all its dependencies on your system.
Step 3: Check pip version
Once all packages are installed, issue the following command to check the installed version of the pip tool for python2:
The installed version will be displayed on the terminal after running the above command.
Install Pip for python 3
Similarly, the following command you need to implement on the terminal to install pip-tools for python 3 is shown below:
Step 1: Update the Packages list by running the following command:
Step 2: Install pip along with all dependencies for python 3 by executing the following command:
Step 3: verify the pip installation using the following command:
Use of Pip
We will also explore the use of pip in this article. By using pip, the user can install python packages from PyPI, local projects, version control, and other project distributions. Usually, the pip would be used inside the virtual environment. Python virtual environment allows you to install python packages inside an isolated space without disturbing the other python project modules.
Let’s discuss some useful pip commands that are mentioned below.
With pip, you can list all packages, as follows:
You can search for a package through pip, using the following command:
With pip, you can install a python package from PyPI, as follows:
For example, we want to install a python package ‘scrapy’ through pip. So, the following command is what you need to enter on the terminal:
You can also display the package information using the following commands:
$ pip3 show wheel
The command below allows you to remove or uninstall a package through pip3:
To uninstall the scrapy package, run the below-mentioned command:
That’s all about the basic commands of the pip tool. To explore more commands and options about pip, run the following command on the terminal:
All pip commands and option will be displayed on the terminal as follows:
In this article, we have learned how to install the python-pip tool for python 2 and python 3 on the Debian 10 buster system. We have executed various commands to understand the use of pip. Moreover, we have also explained the use of the pip tool.