PIP-LOCK(1)
π
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 ispylock.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-pep517to 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 formKEY=VALUE. use multiple--config-settingsoptions 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--hashoption. π (( 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 apyproject.tomlfile. if a path is given, the name of the file must bepyproject.toml. defaults to usingpyproject.tomlin 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 π
π COPYRIGHT π
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