commands.sh

pip lock

all

Lock Python packages and their dependencies into a reproducible file. Experimental feature of `pip`.

More info →

Options (3)

-e, --editableboolean

Generate a `pylock.toml` for the current project

Example: pip lock {{[-e|--editable]}} .
-r, --requirementboolean

Lock dependencies from a requirements file

Example: pip lock {{[-r|--requirement]}} {{path/to/requirements.txt}}
-o, --outputboolean

Specify a custom output file for the lock

Example: pip lock {{[-o|--output]}} {{path/to/lockfile.toml}}

Examples (4)

Generate a `pylock.toml` for the current project

pip lock [-e|--editable] .

Lock dependencies from a requirements file

pip lock [-r|--requirement] path/to/requirements.txt

Specify a custom output file for the lock

pip lock [-o|--output] path/to/lockfile.toml

Lock a specific package and its dependencies

pip lock package
made by @shridhargupta | data from tldr-pages