pip install failing with SSL certificate error
Answered
9
When I try pip install, I get SSL: CERTIFICATE_VERIFY_FAILED error. How can I fix this?
F
Asked by
fatima_dev
Silver
•
169 rep
1 Answer
18
SSL certificate errors can occur due to corporate proxies or outdated certificates. Here are the solutions:
Update pip and certificates
# Update pip
python -m pip install --upgrade pip
# Install/update certificates
pip install --upgrade certifi
Use trusted host (temporary fix)
pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org package-name
Set in pip.conf (permanent fix)
# Create/edit ~/.pip/pip.conf
[global]
trusted-host = pypi.org
pypi.python.org
files.pythonhosted.org
W
Platinum
•
285 rep
Your Answer
You need to be logged in to answer questions.
Log In to Answer