Skip to content

Problem Confirming the SSL Certificate - OSX #5236

Closed
@melsener

Description

@melsener
  • 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.

Activity

jackton1

jackton1 commented on Apr 16, 2018

@jackton1

Upgrade pip using.

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

Instead of pip install -U pip

melsener

melsener commented on Apr 16, 2018

@melsener
Author

@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

imzeali

imzeali commented on Apr 17, 2018

@imzeali

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

gitanupam

gitanupam commented on Apr 25, 2018

@gitanupam

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

evilsperm commented on Apr 29, 2018

@evilsperm

@jackton1

Thanks!

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

alejandrooropeza

alejandrooropeza commented on May 17, 2018

@alejandrooropeza

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

locked as resolved and limited conversation to collaborators on May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @evilsperm@alejandrooropeza@pradyunsg@melsener@gitanupam

        Issue actions

          Problem Confirming the SSL Certificate - OSX · Issue #5236 · pypa/pip