Getting Started
Get up and running with depwhy in under a minute.
Installation
Install depwhy from PyPI using pip:
bash
pip install depwhyIf you use uv as your package manager, depwhy installs the same way:
bash
uv pip install depwhydepwhy requires Python 3.10 or later.
Verify Installation
After installing, confirm that depwhy is available on your PATH:
bash
depwhy --versionYou should see:
$ depwhy 0.1.1
Your First Analysis
Create a sample requirements.txt with a known conflict:
text
requests==2.28.0
urllib3==2.0.0Then run depwhy against it:
bash
depwhy requirements.txtdepwhy resolves the full dependency graph and reports every conflict it finds, along with ranked fixes:
$ depwhy requirements.txt2 conflict(s) foundurllib3Problem: requests==2.28.0 requires urllib3>=1.21.1,<1.27, but you have urllib3==2.0.0 pinnedSolution: Remove your pin — use urllib3==1.26.18 (latest compatible)→ pip install urllib3==1.26.18Alternative: Upgrade requests to >=2.29.0 (loosens urllib3 upper bound)→ pip install requests==2.29.0
Each conflict includes:
- Problem — a plain-English description of which version constraints clash and why.
- Solution — the lowest-risk fix, usually adjusting the pinned package.
- Alternative — other viable fixes ranked by compatibility risk.
What's Next
- CLI Reference — explore all available flags and output formats.
- API Reference — use depwhy programmatically in your own Python code.