Fix pip that will not install
We'll run pip install -v, check network and SSL, fix trusted hosts or certificates—or tell you when to escalate.
What you'll need
- Python and pip installed
- Network access (or proxy config)
Step-by-step diagnostic
Quick triage — pick your path
Get started
Choose the option that matches what you see. You can jump straight to that section.
Show full guide
Steps
Goal: Run pip install -v, check network and SSL, fix trusted hosts or certificates—or escalate.
- Run
pip install -v <package>. Note the exact error. - Good: You see a specific error (connection, SSL, 404, permission). Proceed to Check error and connectivity.
- Bad: pip hangs—check network connectivity and proxy.
Check error and connectivity
Goal: Confirm the error and test index reachability.
- Run
pip config listto see the configured index URL. - Test with
curl -I https://pypi.org/simple/orping pypi.org. If unreachable, check proxy (HTTP_PROXY, HTTPS_PROXY) or firewall. - Run
df -hand confirm/and~/.cache/piphave free space. - Good: Index is reachable and disk has space. Proceed to Fix SSL or index.
- Bad: Index unreachable or disk full—fix the index URL, proxy, or free space first.
Fix SSL or index
Goal: Fix SSL certificate errors or wrong index URL.
- If the error is SSL-related, run
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org <package>. For a custom index, add its host with--trusted-host. - If the index URL is wrong, set
pip config set global.index-url https://pypi.org/simple/or use--index-urlon the command. - If the error is permission denied, create a venv:
python -m venv .venv, activate it, thenpip install <package>. - Good: Install succeeds. Bad: Clear cache with
pip cache purgeand retry, or escalate.
Clear cache and retry
Goal: Remove corrupted cache and retry.
- Run
pip cache purgeor delete~/.cache/pip. Runpython -m pip install --upgrade pip. Retrypip install <package>. - Good: Install succeeds. Bad: Escalate with the error and config.
When to escalate
Escalate if:
- The index is managed by a central team and you cannot change it.
- The proxy or firewall blocks pip and you cannot change it.
- The fix requires infrastructure changes outside your control.
Provide: the pip error, pip config list output, and result of curl -I to the index URL.
Verification
pip install <package>completes without errors.- The package is installed and
pip listshows it. - No SSL, connection, or permission errors in the output.
Escalation ladder
Work from the device outward. Stop when the problem is fixed.
- Capture error Run pip install -v; note exact error.
- Connectivity and disk Test index URL with curl; check df -h.
- SSL and index Add --trusted-host or fix index-url.
- Venv and cache Use virtual environment; clear pip cache.
- Escalate Enterprise-managed index or infrastructure change needed.
What to capture if you need help
Before calling support or posting for help, have these ready. It speeds everything up.
- Exact pip error message
- Output of pip config list
- Result of curl -I to index URL
- df -h and disk usage
Does pip install show a specific error?
Run pip install -v <package> and note the error: connection, SSL, 404, or permission.
You can change your answer later.
Check connectivity and timeouts
Can you reach the index URL?
Test with curl -I. Index must return HTTP 200.
You can change your answer later.
Fix index URL and retry
Is disk space sufficient?
pip needs space for downloads and cache.
You can change your answer later.
Is the error SSL-related?
SSL: CERTIFICATE_VERIFY_FAILED or similar.
You can change your answer later.
Add trusted-host and retry
Is the error permission denied?
Permission denied when installing to system Python.
You can change your answer later.
Use virtual environment
Clear cache and retry
Escalate
Reviewed by Blackbox Atlas
Frequently asked questions
- Why would pip install fail?
- Network unreachable, SSL certificate errors, wrong or unreachable index URL, full disk, or permission denied. Run pip install -v to see the exact error.
- Can I fix pip install myself?
- Yes. Check connectivity, SSL, index URL, disk space, and permissions. Use --trusted-host for SSL issues, --index-url for custom indexes, or a virtual environment for permission issues.
- When should I escalate pip install failures?
- If the index is enterprise-managed and you cannot change it, or the fix requires proxy or firewall changes outside your control.
Rate this guide
Was this helpful?
Thanks for your feedback.