I've tried to install Keras (keras.io) and faced with a problem related confirming ssl certificate.
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.
Upgrade pip using.
curl https://bootstrap.pypa.io/get-pip.py | python3
Instead of pip install -U pip
@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
@jackton1 Thanks! I use pytyon2.7 , upgrading by curl https://bootstrap.pypa.io/get-pip.py | python
it work
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
@jackton1
Thanks!
Worked perfectly, I'm not getting the ssl error anymore and can finally install again.
I had the same problem, Run upgrade curl https://bootstrap.pypa.io/get-pip.py | python
Most helpful comment
Upgrade pip using.
Instead of
pip install -U pip