1

I'm on a Macbook. And whenever I try to use pip to install anything it fails due to openssl issues. Below are exactly the steps I'm taking to try to do it.

$ virtualenv --version
15.1.0

$ virtualenv saqibvenv7
New python executable in /Users/saqib.ali/saqibvenv7/bin/python
Installing setuptools, pip, wheel...done.

$ source saqibvenv7/bin/activate

(saqibvenv7) $ python --version
Python 2.7.10

(saqibvenv7) $ pip --version
pip 9.0.1 from /Users/saqib.ali/saqibvenv7/lib/python2.7/site-packages (python 2.7)

(saqibvenv7) $ pip install Django==1.8.2
Collecting Django==1.8.2
  Could not fetch URL https://pypi.python.org/simple/django/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
  Could not find a version that satisfies the requirement Django==1.8.2 (from versions: )
No matching distribution found for Django==1.8.2

What is the solution to this? I did brew reinstall openssl. But that didn't make any difference.

Saqib Ali
  • 9,138
  • 28
  • 99
  • 216
  • Possible duplicate of [Not able to install Python packages \[SSL: TLSV1\_ALERT\_PROTOCOL\_VERSION\]](https://stackoverflow.com/questions/49768770/not-able-to-install-python-packages-ssl-tlsv1-alert-protocol-version) – phd Sep 02 '18 at 07:21
  • https://stackoverflow.com/search?q=%5Bpip%5D+tlsv1+alert+protocol+version – phd Sep 02 '18 at 07:21

1 Answers1

0

Try installing a more recent version of pip using e.g. pip install --upgrade pip

Jerry Chi
  • 127
  • 7
  • Pip is totally borked: `$ pip install --upgrade pip Cache entry deserialization failed, entry ignored Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping Requirement already up-to-date: pip in ./saqibvenv7/lib/python2.7/site-packages` – Saqib Ali Sep 02 '18 at 07:12
  • Maybe try uninstalling `pip` first https://stackoverflow.com/questions/21012597/how-to-uninstall-pip-on-osx – Jerry Chi Sep 03 '18 at 07:32