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

  • Yes, it is available. What is the output of apt-cache policy python-pip? Also post the output of apt-cache policy. – Faheem Mitha Feb 1 '15 at 12:38
  • "apt-cache policy python-pip" gave me "N: Unable to locate package python-pip". for the other comment, it gave me a longer output you can see it here. pastebin.com/bGUMjiuL – Jako Feb 1 '15 at 17:10

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.

  • Wow. thank you for the very much appreciated advice! – Jako Feb 2 '15 at 20:07
  • What about pip-3.2, packaged with wheezy? Does that also have security issues? If so, and if you aren't dealing with modules that aren't ready for python 3, then presumably that's a better option? – mc0e Jul 26 '15 at 21:07
  • @mc0e Do you have problems finding the version number? pip --version will give it. I am not sure what you are referring to with "that" in being a better option. If you mean 2.7.9, the answer is maybe. – Anthon Jul 28 '15 at 5:33
  • 1
    +1, especially for version info. However, I have Python 2.7.9 installed on Raspberry Pi (raspbian) and pip is not included by default. – Andrejs Cainikovs Mar 6 '17 at 14:56
  • I tried this but only got an error from wget; ERROR: The certificate of bootstrap.pypa.io' is not trusted. ERROR: The certificate of bootstrap.pypa.io' hasn't got a known issuer. – user5359531 Dec 8 '17 at 6:28

try apt-get update. I see it in debian wheezy:

root@aramin:/home/undefine# apt-cache show python-pip
Package: python-pip
Version: 1.1-3
Installed-Size: 457
Maintainer: Debian Python Modules Team 
Architecture: all
Depends: python2.6, python (>= 2.6.6-7~), python (= 0.6c1)
Recommends: python-dev-all (>= 2.6), build-essential
Description-en: alternative Python package installer
 pip is a replacement for easy_install, and is intended to be an improved
 Python package installer.  It integrates with virtualenv, doesn't do partial
 installs, can save package state for replaying, can install from non-egg
 sources, and can install from version control repositories.
Homepage: http://pip.openplans.org/
Description-md5: 8d21e4048f43043df36daaae334010b5
Tag: admin::package-management, devel::lang:python, devel::packaging,
 implemented-in::python, role::program
Section: python
Priority: optional
Filename: pool/main/p/python-pip/python-pip_1.1-3_all.deb
Size: 111846
MD5sum: b9f16d9d57fbfb42a96d3b2ece11acae
SHA1: c33418777cbb82320a53f63083ecea1da4f8f559
SHA256: ffd03a25f0c1f457e810a930d83b0cab07e8c70b0f3ce63747544cc6fc39a61f

root@aramin:/home/undefine# apt-cache policy python-pip
  Zainstalowana: (brak)
  Kandydująca:   1.1-3
  Tabela wersji:
     1.1-3 0
        500 debtorrent://localhost/ftp.pl.debian.org/debian/ stable/main i386 Packages
  • Thank you! after apt-get update I was able to install the package. I think I do not really understand what apt-get update really does! I do it randomly; I installed this Debian one month ago and I already issued the command at least 5 times. I wonder why, this one gave me python-pip back!!?? – Jako Feb 1 '15 at 17:13
  • apt-get update: askubuntu.com/a/222352 – jezmck Nov 14 '17 at 19:01

I had the same issue on Debian "jessie", this worked for me:

sudo apt-get remove python* 
sudo aptitude install python-pip
  • This may broke your system. – Foto Blysk Sep 26 '18 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.