New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Confirming the SSL Certificate - OSX #5236

Closed
melsener opened this Issue Apr 15, 2018 · 6 comments

Comments

Projects
None yet
7 participants
@melsener

melsener commented Apr 15, 2018

  • Pip version: pip 9.0.1
  • Python version: Python 3.5.2 and Python 2.7.10 installed
  • Operating system: OSX - 10.13.4

Description:

I've tried to install Keras (keras.io) and faced with a problem related confirming ssl certificate.

What I've run:

First:

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

Then I checked my system:

$ python -c "import ssl; print ssl.OPENSSL_VERSION"
LibreSSL 2.2.7
$ python --version
Python 2.7.10
$ python3 -c "import ssl; print (ssl.OPENSSL_VERSION)"
OpenSSL 0.9.8zh 14 Jan 2016
$ python3 --version
Python 3.5.2
$ pip --version
pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (python 3.5)

Actually it seems quite odd when I run pip, it automatically goes with Python3 but my defauly python is Python2. Can there be such conflict?

Also, I've tried upgrading pip:

$ pip install --upgrade pip
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:645) - skipping
Requirement already up-to-date: pip in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
$ pip --version
pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (python 3.5)

Again SSL certificate error occurred.

@jackton1

This comment has been minimized.

jackton1 commented Apr 16, 2018

Upgrade pip using.

curl https://bootstrap.pypa.io/get-pip.py | python3

Instead of pip install -U pip

@melsener

This comment has been minimized.

melsener commented Apr 16, 2018

@jackton1 thank you.
Also I tried upgrading pip2 by curl https://bootstrap.pypa.io/get-pip.py | python but it didn't work.
However I solved the pip2 issue by: pip2 install --upgrade pip

@melsener melsener closed this Apr 16, 2018

@imzeali

This comment has been minimized.

imzeali commented Apr 17, 2018

@jackton1 Thanks! I use pytyon2.7 , upgrading by curl https://bootstrap.pypa.io/get-pip.py | python it work

@gitanupam

This comment has been minimized.

gitanupam commented Apr 25, 2018

This is due to the recent TLS support deprecation by Python.org sites. Need to upgrade pip (but without using pip!) See this SO post with details

@evilsperm

This comment has been minimized.

evilsperm commented Apr 29, 2018

@jackton1

Thanks!

Worked perfectly, I'm not getting the ssl error anymore and can finally install again.

@alejandrooropeza

This comment has been minimized.

alejandrooropeza commented May 17, 2018

I had the same problem, Run upgrade curl https://bootstrap.pypa.io/get-pip.py | python

@pypa pypa locked as resolved and limited conversation to collaborators May 18, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.