Registry / testing / pip-check-reqs

pip-check-reqs

JSON →
library2.5.6pypypi✓ verified 84d ago

A tool to find packages that should or should not be in requirements for a Python project. It checks for missing dependencies (packages imported but not listed) and unused packages (listed but not imported). Current version 2.5.6, requires Python >=3.9, actively maintained.

pip install pip-check-reqs
INSTALL
IMPORT
SIG · PIP-CHECK-REQS
P
pip-check-reqs
testingpythonv2.5.6
Install
2.1s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.5.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.1s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pip_check_reqs
import pip_check_reqs
The module is imported as a whole; no specific class/function imports are standard. Use command-line tool.

Basic usage: check for missing dependencies and find unused packages in a requirements file.

pip install pip-check-reqs pip-check-reqs check-requirements -r requirements.txt pip-check-reqs find-unused -r requirements.txt
pip-check-reqs --version
Debug
Known issues
gotchaThe tool only analyses static imports as reported by `pip freeze` and static analysis of import statements. Dynamic imports (e.g., `importlib.import_module()`) are not detected. You may miss dependencies if your code uses dynamic imports.
fix
Manually verify dynamic imports or use a more comprehensive tool like `pip-audit` or `safety`.
affects: all
gotchaRunning `pip-check-reqs` on a project without first installing all dependencies in the same environment will give false positives/negatives. The tool relies on locally installed packages to match against imports.
fix
Always run in a virtual environment where all project dependencies are installed via `pip install -r requirements.txt`.
affects: all
deprecatedThe `--requirements` flag is deprecated in favor of `-r`. In version 2.5.6, `--requirements` still works but may be removed in the future.
fix
Use `pip-check-reqs check-requirements -r requirements.txt` instead of `--requirements requirements.txt`.
affects: 2.5.x
Errors
Common errors & fixes
pip._vendor.pkg_resources.RequirementParseError: Invalid requirement, parse error in ...
Invalid syntax or malformed line in requirements.txt (e.g., missing version specifier).
fix
Fix the requirements file to comply with PEP 508 format. Example: 'package>=1.0' not 'package >=1.0' with extra spaces.
ModuleNotFoundError: No module named 'some_package'
The tool cannot find an imported module in the environment because it is not installed.
fix
Install the missing package via `pip install some_package` or add it to requirements.txt.
pip_check_reqs.exceptions.PackageNotFoundError: Package 'some-package' not found in environment
The package listed in requirements.txt is not installed in the current environment.
fix
Run `pip install -r requirements.txt` to install all listed packages.
Upgrade
Version history
2.5.6latest on PyPI · released Jan 27, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
pip-check-reqs — pip install pip-check-reqs · libregistry