In this tutorial, we will explain how to install pip on Debian 13 OS. Developers use Pip, the standard package manager for Python, to install and manage Python software packages. The PIP package manager allows users to easily install Python libraries and modules that are not part of the standard Python library. When installing a Python package with PIP, it automatically handles the installation of the dependencies required for the module to function properly. Other functions of the PIP are that it is used for Python virtual environments for managing the project dependencies without affecting the global Python modules on the server.
Installing pip on Debian 13 is straightforward and can take a couple of minutes. Let’s go!
Prerequisites
- A server running Debian 13 OS
- User privileges: root or non-root user with sudo privileges
Update the System
Before we start with the installation of pip we assume that you have a freshly installed OS, which is why we will update the system packages to their latest versions. To do that execute the following command:
sudo apt update -y && sudo apt upgrade -y
Install Python
Ensure that you install Python before installing pip. To check this execute the command below:
python3 -V
If you have no Python version installed, you will get the following output:
root@host:~# python3 -V -bash: /usr/bin/python3: No such file or directory
To install Python3 on Debian 13 you need to execute the following command:
sudo apt install python3 -y
Now if you check the installed Python3 version you should get output similar to this:
root@host:~# python3 -V Python 3.13.5
Since Python 3 is installed as a prerequisite for the pip, in the next headings, we will show you two different methods for installing it.
Install Pip from the Debian repository
The latest Debian 13 OS includes the Pip package manager by default in its repository. The benefits of installing pip from the official Debian repository are simplified updates, managing the packages more easily with a couple of commands, etc.
To install pip from the apt repository, execute the command below:
sudo apt install python3-pip
Before you confirm with y about the pip installation, you can notice the dependencies that will be installed when installing pip from the official Debian repo:
root@host:~# sudo apt install python3-pip Installing: python3-pip Installing dependencies: build-essential g++-14 libalgorithm-diff-perl libfakeroot libjs-underscore patch python3.13-dev dpkg-dev g++-14-x86-64-linux-gnu libalgorithm-diff-xs-perl libfile-fcntllock-perl libpython3-dev python3-dev sq fakeroot g++-x86-64-linux-gnu libalgorithm-merge-perl libjs-jquery libpython3.13 python3-packaging g++ javascript-common libdpkg-perl libjs-sphinxdoc libpython3.13-dev python3-wheel Suggested packages: debian-keyring debian-tag2upload-keyring g++-multilib g++-14-multilib gcc-14-doc git bzr ed diffutils-doc python3-setuptools Summary: Upgrading: 0, Installing: 27, Removing: 0, Not Upgrading: 0 Download size: 30.1 MB Space needed: 113 MB / 76.4 GB available Continue? [Y/n] Y
Once the installation is complete, to check the installed pip version, you can use the command below:
pip -V
You should get output similar to this:
root@host:~# pip -V pip 25.1.1 from /usr/lib/python3/dist-packages/pip (python 3.13)
Install Pip from installation script
The second method for installing pip is from the installation script. This method is used for installing some specific pip versions that are not available in the official Debian repository. The installation script is called get-pip.py and can be downloaded with the curl command as explained below:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
To install pip, we will run the script through the following python3 command:
sudo python3 get-pip.py
The installation will complete in a couple of seconds, and the output should look similar to this:
root@host:~# python3 get-pip.py --break-system-packages Collecting pip Downloading pip-25.2-py3-none-any.whl.metadata (4.7 kB) Downloading pip-25.2-py3-none-any.whl (1.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 5.4 MB/s 0:00:00 Installing collected packages: pip Successfully installed pip-25.2
Useful Pip commands
This is a list of the most used pip commands, for installing, listing, searching, removing, etc.
pip install - Install a package from PyPI Example: pip install requests
pip uninstall - Remove a package Example: pip uninstall numpy
pip list - List all installed packages Example: pip list
pip show - Show detailed info (version, dependencies, etc.) about a package Example: pip show flask
pip freeze - Output installed packages and versions Example: pip freeze
pip install -r requirements.txt - Install all packages listed in a file Example: pip install -r requirements.txt
pip search - Search PyPI for packages with “term” in name or description (though this is deprecated in newer versions) Example: pip search django
That’s it. You successfully installed pip on Debian 13 OS. This blog post covered two different methods for installing pip and the most commonly used pip commands.
If you liked this post about how to install pip on Debian 13, please share it with your friends or leave a comment down below.