PIP-LOCK(1)
π PIP-LOCK(1) β the pip lock glow-up
okay bestie, sit down, hydrate, and let me tell you about pip-lock β it's the lock command from the pip manual, section 1, and it is genuinely about to change your whole dependency situation. no cap. π«Ά
β¨ NAME β¨
pip-lock β the description of the pip lock command. that's it, that's the name, she's simple and she's iconic. π
πΈ DESCRIPTION πΈ
EXPERIMENTAL β yes babe, she's experimental, we're in our beta era, be gentle. π§ͺ
What she does: lock packages and their dependencies from:
- PyPI (and other indexes) using requirement specifiers. ποΈ
- VCS project urls. π
- Local project directories. π
- Local or remote source archives. ποΈ
(that last one's local or remote source archives, fr fr.)
pip also supports locking from "requirements files", which are literally the easiest way to specify a whole environment to be installed. one file, whole vibe, periodt. β¨
β οΈ real talk, no cap: the generated lock file is only guaranteed to be valid for the current python version and platform. so if you ship it to a different python or a different platform, that's on you bestie, she never promised that. π
π USAGE π
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 lane, all four are valid, all four slay. π
π OPTIONS π
okay this is the part you actually came for. every single flag, no skips, I would never do you like that. π«Ά
-o,--output <path>β the lock file name. default ispylock.toml. and if you pass-she writes to stdout instead, which is giving very "pipe me into something else" energy. π- (environment variable:
PIP_OUTPUT)
- (environment variable:
-r,--requirement <file>β install from the given requirements file. you can use this option multiple times, stack 'em up. π₯- (environment variable:
PIP_REQUIREMENT)
- (environment variable:
--requirements-from-script <file>β install dependencies of the given script file, as defined by PEP 723 inline metadata. yes, your script can just contain its own deps now, main character energy fr. π- (environment variable:
PIP_REQUIREMENTS_FROM_SCRIPT)
- (environment variable:
-c,--constraint <file>β constrain versions using the given constraints file. also stackable, use it multiple times. π- (environment variable:
PIP_CONSTRAINT)
- (environment variable:
--build-constraint <file>β constrain build dependencies using the given constraints file. multiple times, again, go off. ποΈ- (environment variable:
PIP_BUILD_CONSTRAINT)
- (environment variable:
--no-depsβ don't install package dependencies. just the package, nothing else, she travels light. π- (environment variable:
PIP_NO_DEPS,PIP_NO_DEPENDENCIES)
- (environment variable:
-e,--editable <path/url>β install a project in editable mode (i.e. setuptools"develop mode") from a local project path or a VCS url. the classic, the legend. βοΈ- (environment variable:
PIP_EDITABLE)
- (environment variable:
--src <dir>β the directory to check out editable projects into. the default in a virtualenv is<venv path>/src, and the default for global installs is<current dir>/src. ποΈ- (environment variable:
PIP_SRC,PIP_SOURCE,PIP_SOURCE_DIR,PIP_SOURCE_DIRECTORY)
- (environment variable:
--ignore-requires-pythonβ ignore theRequires-Pythoninformation. she's not looking at it, she doesn't care, she's above it. π- (environment variable:
PIP_IGNORE_REQUIRES_PYTHON)
- (environment variable:
--no-build-isolationβ disable isolation when building a modern source distribution. β οΈ heads up bestie: build dependencies specified by PEP 518 must already be installed if this option is used. no isolation, no safety net. π- (environment variable:
PIP_NO_BUILD_ISOLATION)
- (environment variable:
--check-build-dependenciesβ check the build dependencies. that's the whole job. β- (environment variable:
PIP_CHECK_BUILD_DEPENDENCIES)
- (environment variable:
-C,--config-settings <settings>β configuration settings to be passed to the build backend. settings take the formKEY=VALUE. use multiple--config-settingsoptions to pass multiple keys to the backend. π§- (environment variable:
PIP_CONFIG_SETTINGS)
- (environment variable:
--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. security girlies stay winning. π- (environment variable:
PIP_REQUIRE_HASHES)
- (environment variable:
--progress-bar <progress_bar>β specify whether the progress bar should be used. in'auto'mode,--quietwill suppress all progress bars. the choices are[auto, on, off, raw]and the default isauto. π- (environment variable:
PIP_PROGRESS_BAR)
- (environment variable:
--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)
- (environment variable:
--no-cleanβ don't clean up build directories. leave the mess, she's not your mom. π§Ήβ- (environment variable:
PIP_NO_CLEAN)
- (environment variable:
π Author
pip developers β the whole crew, the collective, the group chat that actually ships. π
π Copyright
The pip developers. π«Ά
π¦ SEE ALSO π¦
(no SEE ALSO in the original, so nothing to link β but you know the vibes, go read the rest of the pip manual, iykyk π)
okay that's the whole page bestie, you're fully locked in now. π and for the cute sign-off: this whole thing is from version 26.0, dated Aug 26, 2026, and it's still PIP-LOCK(1) at the top and the bottom because she's consistent like that. go forth and lock your packages. slay. β¨ππ
π¦ where this page comes from
- fedora 44: python3-pip 26.0.1-3.fc44 Β· 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 on : a language model's rewrite of the original, under its terms