pip-check-reqs
Find packages that should or should not be in requirements for a project
What it is and what it does
pip-check-reqs is a linter that compares your project's actual code imports against your declared dependencies. It runs two checks: pip-missing-reqs finds modules you're importing that aren't listed in requirements.txt (catching transitive dependencies you've accidentally relied on), and pip-extra-reqs finds packages in requirements.txt that your code never imports (identifying dead weight). The tool supports excluding test files and conditionally-imported modules via command-line flags, and can work with either requirements.txt or pyproject.toml.
You run it as a command-line tool in your project directory, pointing it at your source code. It parses all imports, maps them to their package names using packaging metadata, and reports mismatches. It's designed to integrate into CI/CD via tox or similar test runners, letting you catch dependency drift before it causes production surprises.
Use it for:
- Detect transitive dependencies you've accidentally relied on so you can add them explicitly to requirements.txt.
- Find and remove unused packages from requirements.txt to reduce your dependency footprint and attack surface.
- Validate that a refactored codebase still has all the dependencies it needs after removing old code.
- Integrate into CI to prevent dependency drift—catching missing or extra packages before they reach production.
- Audit legacy projects to understand which declared dependencies are actually used versus which are cruft.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Audits Python project imports against requirements.txt to find missing or unused dependencies, helping keep your dependency list accurate and complete.
Yes. This is a stable, actively maintained linter that solves a real problem—keeping requirements.txt in sync with actual code. Low install friction, no security issues, and MIT-licensed. Worth adding to any Python project's CI pipeline, especially if you want to avoid the surprise of discovering you've been relying on a transitive dependency.
Install
pip-check-reqs on PyPI
pip
pip install pip-check-reqsuv
uv add pip-check-reqspoetry
poetry add pip-check-reqsInstalling pip-check-reqs
Before you install
Low friction install with only two stable runtime dependencies (packaging and pip). Active maintenance with a recent release 15 days ago and consistent commits.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install pip-check-reqs
# In your project directory:
pip-missing-reqs --ignore-file=tests/* myproject
pip-extra-reqs --ignore-file=tests/* myproject
Requires Python 3.10 or later; project must have a requirements.txt or pyproject.toml file to check against.
Verify before relying
- Whether the tool correctly handles all edge cases in conditional imports and dynamic dependency inclusion.
- Performance characteristics when analyzing very large codebases with thousands of modules.
Package facts
| License | The MIT License (MIT) Copyright (c) 2015 Richard Jones Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — packaging, pip |
| Maintenance | actively maintained — 15 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 87,980/month — #13,758 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pip_check_reqs-3.0.0-py3-none-any.whl
Keywords: lint, pip
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
creosoteCreosote scans your Python project's source…
permissive · top 5,000 on PyPI
fawltydepsFawltydeps identifies undeclared dependencies…
permissive · top 15,000 on PyPI
flake8-requirementsA flake8 plugin that validates whether imported…
permissive · top 15,000 on PyPI
deptryScans Python projects to detect unused,…
permissive · top 5,000 on PyPI
pipreqs-fivetranScans Python project source files and Jupyter…
permissive · top 15,000 on PyPI
update_checkerChecks whether a whitelisted Python package has…
permissive · top 5,000 on PyPI
requirements-detectorScans a Python project to detect and list its…
permissive · top 15,000 on PyPI
depgatherExtracts and lists dependencies from multiple…
permissive · top 15,000 on PyPI
pipreqsScans Python project source code to detect…
permissive · top 5,000 on PyPI
liccheckScans Python project dependencies in…
permissive · top 5,000 on PyPI