How to install pip on Debian 9

install pip on debian 9

Install pip on Debian 9

We will show you, how to install pip on Debian 9. Pip is a package management system which you can use to install and manage packages written in Python. Python is a programming language that allows you to perform web development, software development, system administration, scientific and numeric data analysis and much more. The Python Package Index (PyPI) hosts thousands of third-party modules for Python and you can install any of these modules using the pip package manager. Installing Pip on Debian 9 is really an easy task, just follow the steps below carefully and you should have pip installed on a Debian 9 VPS in a few minutes.

1. Connect via SSH and perform a system update

Before you install pip on your Debian 9 server, connect to your server via SSH and run the following commands to upgrade the system software to the latest version:

sudo apt-get update && sudo apt-get -y upgrade

Once the packages are up to date you can proceed to the next step.

2. Verify if pip is installed on your Debian 9 server

To check whether pip is already installed on your server, run the following command:

pip -V

If pip is not installed on your Debian 9 VPS, you should get an output like the one below:

# pip -V
-bash: pip: command not found

install pip debian 9

3. Install pip on Debian 9

To install pip, run the following command:

sudo apt-get install python-pip

The installation will take a few seconds depending on your connection speed. Once it is completed, run the same command to verify that pip is successfully installed:

pip -V

Now, the output will be similar to the one below:

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

4. Install pip for Python version 3.5+

If you are using Python 3.5+ you need to install pip using the following command:

sudo apt-get install python3-pip

5. Verify pip installation

To verify that the installation is successful, run the following command:

pip3 -V

The output should be similar to the one below:

# pip3 -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5)

Congratulations, you can now use pip to install and manage Python software packages for your next project. For more information about how to use pip, you can refer to the pip documentation.

6. Use the help flag for more info

You can also use the --help flag to get more details about the pip commands, general options, and usage examples. For Python 2, run this command:

pip --help

For Python 3 run the following command:

pip3 --help

The basic syntax for pip is the following:

pip command options

So, for example, to list all currently installed Python modules you should use the list flag:

pip list

For Python 3 the command would be:

pip3 list

The output will show you which modules are currently installed on your system along with the correct version.


installing pip on debian 9Of course, you don’t have to install pip on Debian 9, if you use one of our Python VPS Hosting services, in which case you can simply ask our expert Linux admins to install pip on Debian 9 for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install pip on Debian 9, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.