9
When I try pip install, I get SSL: CERTIFICATE_VERIFY_FAILED error. How can I fix this?
Loading...
Q&A · Answered
When I try pip install, I get SSL: CERTIFICATE_VERIFY_FAILED error. How can I fix this?
Accepted answer
SSL certificate errors can occur due to corporate proxies or outdated certificates. Here are the solutions:
# Update pip
python -m pip install --upgrade pip
# Install/update certificates
pip install --upgrade certifi
pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org package-name
# Create/edit ~/.pip/pip.conf
[global]
trusted-host = pypi.org
pypi.python.org
files.pythonhosted.orgSay what you tried, not only what worked — the next person needs the reasoning. Code goes in a fenced block.