Reputation: 2896
This is not a duplicate. I've read every response there is online.
Any time I try to connect to a website through the terminal I get an error. Many solutions say to try installing certifi first and then attempting, but I can't do that either because then I'd have to connect to https://pypi.python.org/simple/certifi/. I've also tried --trusted-host
but I still receive an error.
Here is the error if I try to run the Install Certificates.command in the Python 3.6 folder:
/Applications/Python\ 3.6/Install\ Certificates.command ; exit;
-- pip install --upgrade certifi
Collecting certifi
Could not fetch URL https://pypi.python.org/simple/certifi/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) - skipping
Could not find a version that satisfies the requirement certifi (from versions: )
No matching distribution found for certifi
Traceback (most recent call last):
File "<stdin>", line 44, in <module>
File "<stdin>", line 25, in main
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-E', '-s', '-m', 'pip', 'install', '--upgrade', 'certifi']' returned non-zero exit status 1.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
I also get the SSL error if I try to use url lib to connect in a python doc and then attempt to run the python doc in the terminal. Let me also mention this is a brand new issue. I ran the same script yesterday and it worked fine.
Versions:
Python 3.6
numpy==1.13.3
ortools==6.6.4656
pandas==0.21.0
protobuf==3.5.0.post1
python-dateutil==2.6.1
pytz==2017.3
six==1.11.0
OpenSSH_7.4p1, LibreSSL 2.5.0
Upvotes: 0
Views: 1355
Reputation: 319
Add Below lines in your script and execute the script. Might be it will solve your issue.
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
Upvotes: 2