How to install pip for python 2.6?

79,074

Solution 1

Just follow the instructions here:

  1. Securely download get-pip.py (this is the 2.6-specific file, link from Ricardo Iramar's answer).
  2. In the directory you saved get-pip.py, run

    sudo python2.6 get-pip.py
    

    and you'll be all set.

This will install pip for Python 2.6, and won't touch your version 2.7 installation.

Solution 2

Find below the steps to install pip on Python 2.6.X:

$ curl https://bootstrap.pypa.io/pip/2.6/get-pip.py -o get-pip.py
$ python get-pip.py

Solution 3

on fedora/centos system, just use

yum install python-pip

on other linux system,use yum-like install tool

on window ,use the other solutions under this question

Solution 4

From this page : pip

pip works with CPython versions 2.6, 2.7, 3.1, 3.2, 3.3, 3.4 and also pypy.

sudo apt-get install python-pip
Share:
79,074

Related videos on Youtube

amphibient
Author by

amphibient

Software Engineer with table manners

Updated on July 09, 2022

Comments

  • amphibient
    amphibient almost 2 years

    I tried following the instructions from this answer but easy_install-2.6 could not find pip:

    >sudo easy_install-2.6 pip
    Processing pip
    error: Not a recognized archive type: pip
    

    How do I install pip for python 2.6?

    My root need for pip for 2.6 is explained in this thread.

  • amphibient
    amphibient almost 10 years
    I do have pip installed but that works with python2.7 distro of python that is installed in parallel on my system with 2.6. i need to get pip to work with 2.6
  • DavidK
    DavidK almost 10 years
    Ok, maybe installing from source is the right way to do it; like MattDMo suggests it.
  • bonh
    bonh about 7 years
    I'm getting this error when trying to run with Python 2.6: AttributeError: 'module' object has no attribute 'WARNING'.
  • Pierre-Luc Pineault
    Pierre-Luc Pineault about 7 years
    Hands down the easiest solution on CentOS
  • paradox
    paradox over 6 years
    I'm on ubuntu 16.04 LTS, this gives me error: File "get-pip.py", line 20061, in <module> main() File "get-pip.py", line 194, in main bootstrap(tmpdir=tmpdir) File "get-pip.py", line 82, in bootstrap import pip zipimport.ZipImportError: can't decompress data; zlib not available
  • Robert Lujo
    Robert Lujo over 6 years
    This worked, thanks, but just a note for others: current version still supports python 2.6, but future versions wont. pip command reports: DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
  • Nandha Kumar
    Nandha Kumar about 6 years
    If you don't have the super user permission, then use --user flag.
  • UKDataGeek
    UKDataGeek almost 6 years
    python2.6: command not found is the error message I get when I try this
  • Mike Stoddart
    Mike Stoddart almost 6 years
    Note that the version of get-pip.py available via this link no longer supports Python 2.6. I believe it requires 2.7 and higher. See Ricardo's answer elsewhere on this page.
  • JackTheKnife
    JackTheKnife over 5 years
    This works better than above which was throwing an error
  • dsl101
    dsl101 over 5 years
    This should be the accepted answer for those of us still trying to support legacy systems :)
  • Manuel Gijón
    Manuel Gijón over 4 years
    I've tryed this and get this error message: pip._vendor.ipaddress.AddressValueError: 'XXX.XX.X.XX/XX' (len 14 != 4) is not permitted as an IPv4 address. Did you pass in a bytes (str in Python 2) instead of a unicode object? (erase the current ip, but there is one where the X's are)
  • rovyko
    rovyko over 4 years
    This gave me the following error: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this.
  • MattDMo
    MattDMo about 4 years
    @MikeStoddart thanks, the link has been edited and clarified
  • MattDMo
    MattDMo about 4 years
    Thanks for the correct link. Someone added it to my answer and I've clarified that it's the 2.6-specific one.
  • lycanthrope10100
    lycanthrope10100 about 3 years
    https://bootstrap.pypa.io/pip/2.6/get-pip.py - Pradyun, on behalf of the volunteers who maintain pip.