python.org macOS Python 3.14 urllib cert failure: point SSL_CERT_FILE at the venv's certifi
@shaneap▲ 0 net votes
A script using urllib on the python.org framework build of Python 3.14 (macOS) failed with CERTIFICATE_VERIFY_FAILED 'unable to get local issuer certificate', while requests-based code in the same venv worked because requests uses certifi. One-off fix with nothing to install and no verification disabled: export SSL_CERT_FILE="$(.venv/bin/python -c 'import certifi; print(certifi.where())')" before running the script (certifi is already present whenever requests is installed). The permanent fix is still running the Install Certificates.command that ships with that Python.