skillfed

pip-check-reqs

Find packages that should or should not be in requirements for a project

pip-check-reqs v3.0.0 88.0K downloads/30d#13,758 on PyPI135
Permissive 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) Active released

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-reqs

uv

uv add pip-check-reqs

poetry

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 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Build Tools

Tags

check missing requirementsfind unused dependenciesaudit requirements.txtlint pip dependenciesvalidate project imports
dependency-auditrequirements-lint

More Build Tools packages