How to Install Pip on Debian 10, 11 and 12?

[post_dropdown]

Python is one of the most used programming languages worldwide. It works well with Linux systems, and Debian comes with preinstalled Python. Pip is a tool for downloading and installing various Python modules and libraries. Every Python developer and even advanced users use Pip on a regular basis. Pip is not installed natively; hence, you should install it manually on Debian.

Pip works with Python 2, but it’s been discontinued, and Python 3 is the latest version. Hence, people prefer using Pip3 on Debian. I also use the Pip3 on my Linux system to download and manage Python3 modules. In this post, I am trying my best to help you with the exact procedures to easily install Pip on Debian 10 and 12.

Installing Pip on Debian System

Installing Pip or pip3 Python is simple, as only one popular method exists. As Debian uses the APT package manager, the installation becomes easier. Here are the exact steps that you have to follow.

  • Like in any other Linux distribution, you have to open the Terminal. You can do it with the “Ctrl + Alt + T” key combination or open it from the Applications Menu.
  • After that, type the following command to see if Python is installed. If it’s installed, it will show the Python version.
Python3 -V
  • I am sharing this command assuming that you’ve installed Python3. If you have Python2 installed, you can replace this command with “python2.”
  • The above command will show the version of the Python installation. If there is no Python installation, install the latest version using the following command.
sudo apt-get install python3
  • If everything is good, then proceed with installing the Pip3 on Debian 12. Here is the exact command to install Pip3 on system.
sudo apt-get install python3-pip
install pip on debian 10, 11, and 12
  • The system will now install the latest version of pip within a few minutes. Once the installation finishes, type the following command to check the version details.
pip3 --version  
  • This will list the version number. After that, you will be able to use the Pip3 on Debian to download and manage Python modules and libraries.
  • You can list all of the Python packages using the following command to help you identify the installed packages.
pip3 list
List Pip3 packages on Debian

That’s it! You are ready to roll with Python as Pip provides a powerful package management within Python.

Uninstall Pip3 from Debian 12

If you are not comfortable with Pip, then you can uninstall it from the system. The single-step method will instantly remove the Pip3 from Debian. Just enter the following command into the terminal, and you are done.

sudo apt remove python3-pip

You may have to enter the Sudo password to remove the Pip and related packages.

How to use Pip3 with Python on Debian?

After installing Pip, you must know how to use it effectively. Just like you use the Apt-get to install various software, pip3 works similarly. Pip works through the command line terminal, so you need to open it first.

  • After that, type the following command to install the package. In this instance, I am installing the “numpy” library for my project. You should search the internet and choose the appropriate package library on your system.
sudo pip3 install numpy
  • That’s it. It’s very simple. Once installed, list out the packages with following command and you will see the entire list.
pip3 list

Pip is itself a powerful package and needs a quick learning to get hold of all of the parameters and commands. You can learn through the official website about all of the parameters and use cases.

Frequently Asked Questions

#1 – Where does Pip3 install in Debian?

By default, Pip or Pip3 installs in the ‘usr/local/‘ directory, which is also the default installation path.

#2 – How to install pip package with python command?

With the command “python get-pip.py” in terminal, Python will automatically install the required Pip package latest version on Debian or other Linux distributions.

Conclusion

Pip is very powerful, and in this post, I tried my best to show you the process of installing and using Pip3 on Debian. It’s very simple, and you need to do it once to use Python to its full potential. I will try my best to share everything about my experience using it in various ways. If you are facing any issues with this method, please ask for my help in the comments below.

Posted In :

Leave a Reply

Your email address will not be published. Required fields are marked *

Swaraj Nandedkar