Debian – Install python pip in Debian Wheezy

debianpip

How to install pip in Debian Wheezy?

I've found many advises apt-get install python-pip but the result is

"Unable to locate package python-pip"

Is pip available in Debian Wheezy? I'm using 7.8

Best Answer

Although apt-get update might seem to help you, I recommend strongly against using pip installed from the Wheeze repository with apt-get install python-pip:

  • that pip is at version 1.1 while the current version is > 9.0
  • version 1.1 of pip has known security problems when used to download packages
  • version 1.1 doesn't restrict downloads/installs to stable versions of packages
  • lacks a lot of new functionality (like support for the wheel format) and misses bug fixes (see the changelog)
  • python-pip installed via apt-get pulls in some perl modules for whatever reason

Unless you are running python2.4 or so that is still supported by pip 1.1 (and which you should not use anyway) you should follow the installation instructions on the pip documentation page to securely download pip (don't use the insecure pip install --upgrade pip with the 1.1 version, and certainly don't install any packages with sudo pip ... with that version)

If you already have made the mistake of installing pip version 1.1, immediately do:

sudo apt-get remove python-pip

After that:

wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py

(for any of the python versions you have installed).

Python2 versions starting with 2.7.9 and Python3 version starting with 3.4 have pip included by default.

Related Question