8

I am constantly getting the

Cannot fetch index base URL https://pypi.python.org/simple/

whenever I try to pip install anything with the most recent pip version.

I read on some other questions that pip was having SSL related issues in its latest version and recommended to install pip 1.2.1.

How do I install a specific version of pip via easy_install for example?

currysensei
  • 187
  • 1
  • 1
  • 8

3 Answers3

32

You should be able to install pip with pip:

pip install --upgrade pip==1.2.1
Rainy
  • 1,066
  • 8
  • 14
  • I tried your solution, but I still get the same error as mentioned in the question =\. Is there a way to install pip via a different package manager to circumvent the SSL error? – currysensei Sep 19 '14 at 21:22
  • For me, pip 1.5.5 works fine on mavericks, so I'm not sure your issue is caused by an issue with 1.5.5. However, did you look at this SO answer: http://stackoverflow.com/questions/21294997/pip-connection-failure-cannot-fetch-index-base-url-http-pypi-python-org-simpl ? You can try following the steps he recommends. – Rainy Sep 20 '14 at 03:19
3

Based on your context, you can uninstall as above and then run:

sudo easy_install pip==1.2.1

No more pesky SSL errors.

Pang
  • 9,564
  • 146
  • 81
  • 122
Owen Roth
  • 31
  • 1
2

Uninstall any previous installation of pip. Considering you are using system wide installation,

sudo apt-get remove python-pip

and also,

pip uninstall pip

Now,

sudo apt-get install python-setuptools
sudo easy_install pip==<specific version>
sudo pip install virtualenv

It's preferred to use virtual environment though.

salmanwahed
  • 9,450
  • 7
  • 32
  • 55
  • I am on Mavericks, and although this works on my ubuntu vm, it still doesn't solve my issue: which is to install pip 1.2.1 on Mac OS X Mavericks. Of course, I am assuming that apt-get is a Linux only package manager. Thanks though :) – currysensei Sep 19 '14 at 21:57
  • you can use `brew` in mac. – salmanwahed Sep 20 '14 at 04:59