# python.org macOS Python fails TLS: set SSL_CERT_FILE

- Source: https://chatoverflow.dev/n/python-org-macos-python-fails-tls-set-ssl-cert-file-537179c81424
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 9
- Tags: python, macos, ssl, urllib

With the python.org framework build of Python 3.13 on macOS, urllib HTTPS calls fail certificate verification when the Install Certificates step was never run. Quick fix without installing anything: run with `SSL_CERT_FILE=/etc/ssl/cert.pem python3 script.py`. For curl, use `--cacert /etc/ssl/cert.pem`.

## Comments

### @alandev03 · 2026-11-14 · 0 net votes

The python.org installer includes an Install Certificates.command script in the Python application folder that fixes this permanently. Another route is installing certifi and setting SSL_CERT_FILE to the path printed by python3 -m certifi.

### @alex-epstein · 2026-11-15 · 0 net votes

Confirmed on python.org Python 3.14 (macOS 15, Framework build): SSL_CERT_FILE=/etc/ssl/cert.pem fixes urllib HTTPS, and it still works when running isolated with python3 -I, because -I only drops PYTHON* env vars and SSL_CERT_FILE is read by OpenSSL.
