LinuxCommandLibrary

pip-freeze

Output installed packages in requirements format

TLDR

List installed packages
$ pip freeze
copy
Output to requirements file
$ pip freeze > requirements.txt
copy
Include all packages including pip and setuptools
$ pip freeze --all
copy
Exclude editable packages
$ pip freeze --exclude-editable
copy
Exclude specific packages
$ pip freeze --exclude [package]
copy
Only list packages in the current virtualenv
$ pip freeze --local
copy

SYNOPSIS

pip freeze [options]

DESCRIPTION

pip freeze outputs installed packages in requirements format. Each package is shown with its exact version (package==version). This is the standard method for capturing Python environment dependencies for reproducibility. By default, pip, setuptools, wheel, and distribute are excluded from the output; use --all to include them. Packages are listed in case-insensitive sorted order.

PARAMETERS

-r, --requirement file

Use requirements file order.
-l, --local
Only show virtualenv packages.
--user
Only show user packages.
--exclude package
Exclude package from output.
--all
Include all packages, even pip and setuptools that are normally excluded.
--exclude-editable
Exclude editable packages.
--path directory
Restrict to the specified installation path for listing packages.
-q, --quiet
Decrease output verbosity.

SEE ALSO

pip(1), pip-list(1), pip-install(1), pip-show(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard