Installing pip using easy_install

Jack Twain picture Jack Twain · Oct 9, 2014 · Viewed 68.3k times · Source

I don't have root access and i want to install python from scratch. So I downloaded the python source code and compiled it. Next I wanted to install pip. But when I ran python get-pip.py I got this error:

ImportError: cannot import name HTTPSHandler

Not having root access then I couldn't install stuff needed. So I thought maybe I can install pip with easy_install so I went and installed setuptools which has easy_install. But when I run easy_install pip I get this error:

Searching for pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: unknown url type: https -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: unknown url type: https -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')

So now how to install pip? I'm really going crazy!

Edit: I can't use virutalenv

Answer

Priyank picture Priyank · Oct 9, 2014

try this to install pip : "easy_install-2.7 -U --user pip"

**another important info** 

To install pip on Ubuntu, Debian or Linux Mint:

$ sudo apt-get install python-pip

To install pip on Fedora:

$ sudo yum install python-pip

To install pip on CentOS, first enable EPEL repository, and then run:

$ sudo yum install python-pip

To install pip on Archlinux:

$ sudo pacman -S python-pip