--- id: pip-check-reqs version: "3.0.0" 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) license_treatment: permissive maintenance: active --- # pip-check-reqs — Find packages that should or should not be in requirements for a project License: permissive · Maintenance: active · Downloads: 88.0K/mo ## 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 above — 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 install pip-check-reqs uv add pip-check-reqs poetry add pip-check-reqs ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 88.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags check missing requirements, find unused dependencies, audit requirements.txt, lint pip dependencies, validate project imports, dependency-audit, requirements-lint [View on SkillFed](https://skillfed.io/packages/pip-check-reqs) · [View on PyPI](https://pypi.org/project/pip-check-reqs/)