PIP-LOCK(1)

πŸ“¦
version 25.1.1 Β· 2 versions
, in epel 9

πŸ’… PIP-LOCK(1) β€” the pip lock glow-up

ok so like, hi bestie ✨ welcome to the pip-lock(1) page β€” it's part of the <pink>pip</pink> manual, and we're about to have a whole moment with it. this is the pip lock command, and she's got main character energy but also a little "handle with care" sticker on her, iykyk πŸŽ€


🌸 NAME 🌸

pip-lock β€” okay so this is the description of the pip lock command. that's it, that's the name section. short and iconic πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

⚠️ EXPERIMENTAL β€” like, for real, she's still in beta. treat her accordingly, no cap.

So pip lock locks packages and their dependencies from all of these places, lowkey a whole buffet:

  • PyPI (and other indexes) using requirement specifiers πŸ’–
  • VCS project urls 🌈
  • Local project directories πŸ“
  • Local or remote source archives 🧚

pip also supports locking from "requirements files", which is literally the easiest way to specify a whole environment to be installed. obsessed, honestly.

πŸ’€ Real talk: the generated lock file is only guaranteed to be valid for the current python version and platform. so like, don't go shipping it to your friend on a different OS and expect it to slay. it won't. #iykyk

✨ USAGE ✨

here's the whole vibe check, all the ways to call her:

python -m pip lock [options] [-e] <local project path> ...
python -m pip lock [options] <requirement specifier> [package-index-options] ...
python -m pip lock [options] -r <requirements file> [package-index-options] ...
python -m pip lock [options] <archive url/path> ...

pick your fighter πŸ’…


πŸŽ€ OPTIONS πŸŽ€

okay bestie, this is the long part β€” but every single one matters, so buckle up 🫢

  • -o, --output <path> β€” the lock file name, default is pylock.toml. pass - and it goes to stdout. (( environment variable: PIP_OUTPUT )) πŸ’–
  • -r, --requirement <file> β€” install from the given requirements file. you can use this option more than once, like, stack 'em. (( environment variable: PIP_REQUIREMENT ))
  • -c, --constraint <file> β€” constrain versions using the given constraints file. yes, this one can be used multiple times too. (( environment variable: PIP_CONSTRAINT ))
  • --no-deps β€” don't install package dependencies. no thoughts, no deps, head empty 🫧 (( environment variable: PIP_NO_DEPS, PIP_NO_DEPENDENCIES ))
  • --pre β€” include pre-release and development versions. by default, pip only finds stable versions, so this is your "i want the chaotic version" pass. πŸ”₯ (( environment variable: PIP_PRE ))
  • -e, --editable <path/url> β€” install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url. (( environment variable: PIP_EDITABLE ))
  • --src <dir> β€” directory to check out editable projects into. the default in a virtualenv is <venv path>/src. the default for global installs is <current dir>/src. (( environment variable: PIP_SRC, PIP_SOURCE, PIP_SOURCE_DIR, PIP_SOURCE_DIRECTORY ))
  • --ignore-requires-python β€” ignore the Requires-Python information. yes, she's ignoring the vibes on purpose 😭 (( environment variable: PIP_IGNORE_REQUIRES_PYTHON ))
  • --no-build-isolation β€” disable isolation when building a modern source distribution. ⚠️ Build dependencies specified by PEP 518 must already be installed if this option is used. so, like, do your homework first. (( environment variable: PIP_NO_BUILD_ISOLATION ))
  • --use-pep517 β€” use PEP 517 for building source distributions (use --no-use-pep517 to force legacy behaviour). retro era, but make it optional. (( environment variable: PIP_USE_PEP517 ))
  • --check-build-dependencies β€” check the build dependencies when PEP517 is used. (( environment variable: PIP_CHECK_BUILD_DEPENDENCIES ))
  • -C, --config-settings <settings> β€” configuration settings to be passed to the PEP 517 build backend. settings take the form KEY=VALUE. use multiple --config-settings options to pass multiple keys to the backend. πŸ’… (( environment variable: PIP_CONFIG_SETTINGS ))
  • --no-binary <format_control> β€” do not use binary packages. can be supplied multiple times, and each time adds to the existing value. accepts either :all: to disable all binary packages, :none: to empty the set (notice the colons πŸ‘€), or one or more package names with commas between them (no colons). ⚠️ note that some packages are tricky to compile and may fail to install when this option is used on them. (( environment variable: PIP_NO_BINARY ))
  • --only-binary <format_control> β€” do not use source packages. can be supplied multiple times, and each time adds to the existing value. accepts either :all: to disable all source packages, :none: to empty the set, or one or more package names with commas between them. ⚠️ packages without binary distributions will fail to install when this option is used on them. (( environment variable: PIP_ONLY_BINARY ))
  • --prefer-binary β€” prefer binary packages over source packages, even if the source packages are newer. loyalty to binaries, periodt. (( environment variable: PIP_PREFER_BINARY ))
  • --require-hashes β€” require a hash to check each requirement against, for repeatable installs. this option is implied when any package in a requirements file has a --hash option. πŸ”’ (( environment variable: PIP_REQUIRE_HASHES ))
  • --progress-bar <progress_bar> β€” specify whether the progress bar should be used [on, off, raw] (default: on). we love a little progress moment. ⭐ (( environment variable: PIP_PROGRESS_BAR ))
  • --group <[path:]group> β€” install a named dependency-group from a pyproject.toml file. if a path is given, the name of the file must be pyproject.toml. defaults to using pyproject.toml in the current directory. πŸŽ€ (( environment variable: PIP_GROUP ))
  • --no-clean β€” don't clean up build directories. leaving the mess behind, honestly relatable πŸ™ˆ (( environment variable: PIP_NO_CLEAN ))

πŸ‘‘ AUTHOR πŸ‘‘

pip developers πŸ’œ


The pip developers


and that's the whole page, bestie β€” you ate that πŸ«ΆπŸ’– she's version <pink>25.1</pink>, dated <lavender>Jun 26, 2025</lavender>, and that's the cute little footer sign-off. now go lock some packages, you gorgeous genius βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from
  • epel 9: python3.13-pip 25.1.1-1.el9 Β· MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause)
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms