pip-chill
pip-chill is a command-line utility that extends `pip freeze` by listing only the Python packages that were directly installed by the user, excluding their transitive dependencies. This helps create cleaner `requirements.txt` files. The current version is 1.0.5, and it has a moderate release cadence with improvements and bug fixes.
Common errors
-
pip-chill: command not found
cause `pip-chill` is not installed in your current environment or its installation directory is not in your system's PATH.fixEnsure `pip-chill` is installed in your active Python environment by running `pip install pip-chill`. -
ERROR: pip-chill requires Python >=3.10, but you have Python 3.9.12.
cause The Python interpreter being used is older than the minimum requirement (Python 3.10) for the latest `pip-chill` version.fixUpgrade your Python environment to version 3.10 or newer. If upgrading Python is not an option, install an older version of `pip-chill` that supports your Python version, for example: `pip install 'pip-chill<1.0.5'`. -
My package 'requests' is installed, but `pip-chill` doesn't list it directly!
cause `requests` is likely a dependency of another package you installed directly. By default, `pip-chill` filters out transitive dependencies.fixTo list all installed packages, including both direct and transitive dependencies, use `pip-chill --no-chill` or `pip-chill --all`.
Warnings
- breaking Starting with version 1.0.5, `pip-chill` explicitly requires Python 3.10 or newer. If you are on an older Python version (e.g., 3.9 or earlier), you will encounter installation errors or runtime issues.
- gotcha `pip-chill` is designed as a command-line interface (CLI) tool and does not expose a public Python API for programmatic `import`. Attempts to `import pip_chill` will not work as expected or will lead to `ModuleNotFoundError`.
- gotcha By default, `pip-chill` lists only the packages you explicitly installed, filtering out their transitive dependencies. This differs from `pip freeze` which lists all installed packages. Users often misunderstand why some installed packages are 'missing' from `pip-chill`'s default output.
Install
-
pip install pip-chill
Quickstart
# List directly installed packages (excluding dependencies): pip-chill # List all installed packages (like pip freeze): pip-chill --no-chill # List all installed packages, including direct and indirect ones: pip-chill --all # Include editable packages: pip-chill --editable