pip
network_error
ai_generated
true
pip._vendor.urllib3.exceptions.MaxRetryError: Could not fetch URL: There was a problem confirming the ssl certificate
ID: pip/ssl-error
87%Fix Rate
90%Confidence
50Evidence
2022-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 24 | active | — | — | — |
Root Cause
SSL certificate verification failed when connecting to PyPI or custom index. Usually caused by corporate MITM proxy injecting its own certificate, outdated system CA certificates, or custom index with self-signed cert.
genericWorkarounds
-
85% success Update system CA certificates
apt-get update && apt-get install ca-certificates && update-ca-certificates
-
90% success Point pip to the corporate CA bundle: pip install --cert /path/to/corporate-ca.crt <package>
pip config set global.cert /path/to/corporate-ca-bundle.crt && pip install <package>
-
88% success Set REQUESTS_CA_BUNDLE environment variable
export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt && pip install <package>
Dead Ends
Common approaches that don't work:
-
Use --trusted-host for all installs permanently
55% fail
Disables SSL verification which is a security risk; does not fix the underlying certificate issue
-
Downgrade to an older pip that is less strict about SSL
75% fail
Older pip versions have security vulnerabilities; SSL strictness is intentional
Error Chain
Leads to:
Preceded by:
Frequently confused with: