PIP-INSTALL(1)

πŸ“¦ version 23.2.1, in centos-stream 9

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

okay so bestie, welcome to the pip-install page from the pip manual β€” this is literally the description of the pip install command and it's about to be your new fave πŸ’–


✨ NAME ✨

pip-install β€” description of pip install command πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the whole vibe of this command is: it installs packages. from where, you ask? bestie, from so many places:

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

and ngl, pip also supports installing from "requirements files", which is the iconic way to specify a whole entire environment to be installed in one go. main character energy fr fr πŸ‘‘


🌈 USAGE 🌈

here's the group chat of ways you can call it β€” copy these exactly, no cap:

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

πŸ‘‘ OPTIONS πŸ‘‘

grab a snack, there's a lot, and every single one is here because we don't skip πŸ’…

  • -r, --requirement <file> β€” install from the given requirements file. you can use this option multiple times, slay ✨
  • -c, --constraint <file> β€” constrain versions using the given constraints file. also usable multiple times πŸ’–
  • --no-deps β€” don't install package dependencies. just the one, alone, independent πŸ¦‹
  • --pre β€” include pre-release and development versions. by default, pip only finds stable versions, so this is your "i want the new-new" button πŸ”₯
  • -e, --editable <path/url> β€” install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url. live-editing hours πŸŽ€
  • --dry-run β€” don't actually install anything, just print what would be. can be used in combination with --ignore-installed to 'resolve' the requirements. window shopping, iconic πŸ™ˆ
  • -t, --target <dir> β€” install packages into <dir>. by default this will not replace existing files/folders in <dir>. use --upgrade to replace existing packages in <dir> with new versions ⭐
  • --platform <platform> β€” only use wheels compatible with <platform>. defaults to the platform of the running system. use this option multiple times to specify multiple platforms supported by the target interpreter 🌸
  • --python-version <python_version> β€” the Python interpreter version to use for wheel and "Requires-Python" compatibility checks. defaults to a version derived from the running interpreter. the version can be specified using up to three dot-separated integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). a major-minor version can also be given as a string without dots (e.g. "37" for 3.7.0) 🐍
  • --implementation <implementation> β€” only use wheels compatible with Python implementation <implementation>, e.g. 'pp', 'jy', 'cp', or 'ip'. if not specified, then the current interpreter implementation is used. use 'py' to force implementation-agnostic wheels 🧚
  • --abi <abi> β€” only use wheels compatible with Python abi <abi>, e.g. 'pypy_41'. if not specified, then the current interpreter abi tag is used. use this option multiple times to specify multiple abis supported by the target interpreter. generally you will need to specify --implementation, --platform, and --python-version when using this option πŸ’«
  • --user β€” install to the Python user install directory for your platform. typically ~/.local/, or %APPDATA%Python on Windows. (see the Python documentation for site.USER_BASE for full details.) 🏠
  • --root <dir> β€” install everything relative to this alternate root directory 🌳
  • --prefix <dir> β€” installation prefix where lib, bin and other top-level folders are placed. note that the resulting installation may contain scripts and other resources which reference the Python interpreter of pip, and not that of --prefix. see also the --python option if the intention is to install packages into another (possibly pip-free) environment πŸ‘€
  • --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" πŸ“
  • -U, --upgrade β€” upgrade all specified packages to the newest available version. the handling of dependencies depends on the upgrade-strategy used ⬆️
  • --upgrade-strategy <upgrade_strategy> β€” determines how dependency upgrading should be handled [default: only-if-needed]. "eager" β€” dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" β€” are upgraded only when they do not satisfy the requirements of the upgraded package(s) πŸ€”
  • --force-reinstall β€” reinstall all packages even if they are already up-to-date. no chill, just reinstall πŸ’€
  • -I, --ignore-installed β€” ignore the installed packages, overwriting them.
⚠️ bestie this can break your system if the existing package is of a different version or was installed with a different package manager! like, fr fr, be careful 😭
  • --ignore-requires-python β€” ignore the Requires-Python information πŸ™ˆ
  • --no-build-isolation β€” disable isolation when building a modern source distribution. build dependencies specified by PEP 518 must be already installed if this option is used πŸ› οΈ
  • --use-pep517 β€” use PEP 517 for building source distributions (use --no-use-pep517 to force legacy behaviour) πŸ”§
  • --check-build-dependencies β€” check the build dependencies when PEP517 is used βœ…
  • --break-system-packages β€” allow pip to modify an EXTERNALLY-MANAGED Python installation. living dangerously, i see 🚨
  • -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 πŸŽ›οΈ
  • --global-option <options> β€” extra global options to be supplied to the setup.py call before the install or bdist_wheel command 🌍
  • --compile β€” compile Python source files to bytecode ⚑
  • --no-compile β€” do not compile Python source files to bytecode 🚫
  • --no-warn-script-location β€” do not warn when installing scripts outside PATH 🀫
  • --no-warn-conflicts β€” do not warn about broken dependencies πŸ™Š
  • --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 😬
  • --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 πŸ’€
  • --prefer-binary β€” prefer older binary packages over newer source packages πŸ‘΅
  • --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 πŸ”
  • --progress-bar <progress_bar> β€” specify whether the progress bar should be used [on, off] (default: on) πŸ“Š
  • --root-user-action <root_user_action> β€” action if pip is run as a root user. by default, a warning message is shown πŸ‘‘
  • --report <file> β€” generate a JSON file describing what pip did to install the provided requirements. can be used in combination with --dry-run and --ignore-installed to 'resolve' the requirements. when - is used as file name it writes to stdout. when writing to stdout, please combine with the --quiet option to avoid mixing pip logging output with JSON output πŸ“
  • --no-clean β€” don't clean up build directories 🧹

🫢 AUTHOR 🫢

pip developers β€” love them, they did that πŸ’–


The pip developers 🌟


aaaand that's the whole page bestie! πŸŽ‰ this one's from pip 23.2, dated Jun 25, 2025 β€” go install something iconic, ily, bye πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from