kamilrashid.dev
Menu

Fixing Python SSL CERTIFICATE_VERIFY_FAILED Error
for MAC only!
Jan 17, 2025
(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1018)')))

To Fix above error on MAC You need valid SSL certificates for Python to trust the site. On macOS, run:

open /Applications/Python\ 3.13/Install\ Certificates.command

If you don’t have that file, you can try:

python -m pip install --upgrade certifi

Alternatively, you can disable SSL verification (not recommended) by passing verify=False to requests.get.