I got a new MacBook Pro running macOS Catalina for work. I installed Python3.9 and have tried to run the included script Install Certificates.command so I can work with requests.
The script fails every time, giving out a bunch of text and
ERROR: No matching distribution found for certifi
I have tried reinstalling python3.9 but that did not change anything.
My CS experience is limited, so any help is very much appreciated. Below is the full output from the script.
-- pip install --upgrade certifi
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /simple/certifi/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /simple/certifi/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /simple/certifi/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /simple/certifi/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /simple/certifi/
Could not fetch URL https://pypi.org/simple/certifi/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/certifi/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))) - skipping
ERROR: Could not find a version that satisfies the requirement certifi (from versions: none)
ERROR: No matching distribution found for certifi
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))) - skipping
Traceback (most recent call last):
File "<stdin>", line 44, in <module>
File "<stdin>", line 24, in main
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9', '-E', '-s', '-m', 'pip', 'install', '--upgrade', 'certifi']' returned non-zero exit status 1.
[Process completed]
Edit: Requests works just fine when I use the pre-installed Python2.7, I assume because those certificates where put in by apple. I am planning just to use that for now, but ideally I can get the certificates on 3.9 working.
Related
I am configuring OPENLDAP for SSL/TLS. I need to configure ldap for secure connection on port like 636.
I have already prepared configurations like LDAPTLS_CACERT="/etc/openldap/cacerts/ca.cert.pem". However while connecting with the server, I am facing below "TLS certificate verification: Error".
I am using below ldapsearch command to check the connection :
env LDAPTLS_CACERT="/etc/openldap/cacerts/ca.cert.pem" ldapsearch -H ldaps://192.168.1.XXX:636 -ZZ -d 1 -b "ou=MyTeam,ou=People,dc=geekforgeek,dc=local" -D "cn=ldapLoger,ou=LdapLoger,dc=geekforgeek,dc=local" -s base "(&(emailAddress=%v)(objectclass=ePerson))"
Following error i am getting as a result :
TLS trace: SSL3 alert write:fatal:unknown CA
TLS trace: SSL_connect:error in error
TLS trace: SSL_connect:error in error
TLS: can't connect: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed (self signed certificate in certificate chain).
ldap_err2string
ldap_start_tls: Can't contact LDAP server (-1)
additional info: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed (self signed certificate in certificate chain)```
Any input on why this error occurs! Please suggest.
I'm working on a gRPC service, and we're using a CA certificate we generated ourselves for our server. Unfortunately, I can't seem to figure out how to tell grpc_cli about that certificate, and so I get "Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed."
I see an option for specifying the client cert and key, but not for the CA cert. What am I missing?
I have a discord bot that works through my computer but when I run it on my vps on debien 10, I get this error:
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl: True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c: 1056)')]
I have no idea where this problem comes from.
I have already tried to reinstall the certificate
$ pip install pygame
Collecting pygame
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1123)'))': /packages/00/86/63b1967d59c3424992f0f822b012bcf24d8d013f8d65b40db20fae01be70/pygame-2.0.0-cp38-cp38-win_amd64.whl
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1123)'))': /packages/00/86/63b1967d59c3424992f0f822b012bcf24d8d013f8d65b40db20fae01be70/pygame-2.0.0-cp38-cp38-win_amd64.whl
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1123)'))': /packages/00/86/63b1967d59c3424992f0f822b012bcf24d8d013f8d65b40db20fae01be70/pygame-2.0.0-cp38-cp38-win_amd64.whl
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1123)'))': /packages/00/86/63b1967d59c3424992f0f822b012bcf24d8d013f8d65b40db20fae01be70/pygame-2.0.0-cp38-cp38-win_amd64.whl
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1123)'))': /packages/00/86/63b1967d59c3424992f0f822b012bcf24d8d013f8d65b40db20fae01be70/pygame-2.0.0-cp38-cp38-win_amd64.whl
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/00/86/63b1967d59c3424992f0f822b012bcf24d8d013f8d65b40db20fae01be70/pygame-2.0.0-cp38-cp38-win_amd64.whl (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1123)')))
Change your timezone with:
timedatectl set-timezone yourtimezone/name
To get the list of timezones timedatectl list-timezones
Then try again.
Just uninstall all stuff of python 1st. Then delete that file from pc. Then uninstall python interpreter and download python form its official page again and install it and also install python interpreter again then
Check it in your cmd or powershell is it running perfectly or not.
It will definitely run.
I am getting the same problem but it was resolved now.
I tried to install Matplotlib using the command mentioned below.
pip install matplotlib
but I am getting an error as below... Please help.
C:\>pip install matplotlib
Collecting matplotlib
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/matplotlib/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/matplotlib/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/matplotlib/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/matplotlib/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/matplotlib/
Could not fetch URL https://pypi.org/simple/matplotlib/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/matplotlib/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping
Could not find a version that satisfies the requirement matplotlib (from versions: )
No matching distribution found for matplotlib
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping
Have you tried installing the Anaconda platform with Python 3.7? Most packages, including matplotlib, are included in the platform and don't require pip to install.