1PIP-INSTALL(1) pip PIP-INSTALL(1)
2
3
4
6 pip-install - description of pip install command
7
9 Install packages from:
10
11 • PyPI (and other indexes) using requirement specifiers.
12
13 • VCS project urls.
14
15 • Local project directories.
16
17 • Local or remote source archives.
18
19 pip also supports installing from "requirements files", which provide
20 an easy way to specify a whole environment to be installed.
21
22
24 python -m pip install [options] <requirement specifier> [package-index-options] ...
25 python -m pip install [options] -r <requirements file> [package-index-options] ...
26 python -m pip install [options] [-e] <vcs project url> ...
27 python -m pip install [options] [-e] <local project path> ...
28 python -m pip install [options] <archive url/path> ...
29
31 -r, --requirement <file>
32 Install from the given requirements file. This option can be
33 used multiple times.
34
35 -c, --constraint <file>
36 Constrain versions using the given constraints file. This option
37 can be used multiple times.
38
39 --no-deps
40 Don't install package dependencies.
41
42 --pre Include pre-release and development versions. By default, pip
43 only finds stable versions.
44
45 -e, --editable <path/url>
46 Install a project in editable mode (i.e. setuptools "develop
47 mode") from a local project path or a VCS url.
48
49 --dry-run
50 Don't actually install anything, just print what would be. Can
51 be used in combination with --ignore-installed to 'resolve' the
52 requirements.
53
54 -t, --target <dir>
55 Install packages into <dir>. By default this will not replace
56 existing files/folders in <dir>. Use --upgrade to replace exist‐
57 ing packages in <dir> with new versions.
58
59 --platform <platform>
60 Only use wheels compatible with <platform>. Defaults to the
61 platform of the running system. Use this option multiple times
62 to specify multiple platforms supported by the target inter‐
63 preter.
64
65 --python-version <python_version>
66 The Python interpreter version to use for wheel and "Re‐
67 quires-Python" compatibility checks. Defaults to a version de‐
68 rived from the running interpreter. The version can be specified
69 using up to three dot-separated integers (e.g. "3" for 3.0.0,
70 "3.7" for 3.7.0, or "3.7.3"). A major-minor version can also be
71 given as a string without dots (e.g. "37" for 3.7.0).
72
73 --implementation <implementation>
74 Only use wheels compatible with Python implementation <implemen‐
75 tation>, e.g. 'pp', 'jy', 'cp', or 'ip'. If not specified, then
76 the current interpreter implementation is used. Use 'py' to
77 force implementation-agnostic wheels.
78
79 --abi <abi>
80 Only use wheels compatible with Python abi <abi>, e.g.
81 'pypy_41'. If not specified, then the current interpreter abi
82 tag is used. Use this option multiple times to specify multiple
83 abis supported by the target interpreter. Generally you will
84 need to specify --implementation, --platform, and --python-ver‐
85 sion when using this option.
86
87 --user Install to the Python user install directory for your platform.
88 Typically ~/.local/, or %APPDATA%Python on Windows. (See the
89 Python documentation for site.USER_BASE for full details.)
90
91 --root <dir>
92 Install everything relative to this alternate root directory.
93
94 --prefix <dir>
95 Installation prefix where lib, bin and other top-level folders
96 are placed. Note that the resulting installation may contain
97 scripts and other resources which reference the Python inter‐
98 preter of pip, and not that of --prefix. See also the --python
99 option if the intention is to install packages into another
100 (possibly pip-free) environment.
101
102 --src <dir>
103 Directory to check out editable projects into. The default in a
104 virtualenv is "<venv path>/src". The default for global installs
105 is "<current dir>/src".
106
107 -U, --upgrade
108 Upgrade all specified packages to the newest available version.
109 The handling of dependencies depends on the upgrade-strategy
110 used.
111
112 --upgrade-strategy <upgrade_strategy>
113 Determines how dependency upgrading should be handled [default:
114 only-if-needed]. "eager" - dependencies are upgraded regardless
115 of whether the currently installed version satisfies the re‐
116 quirements of the upgraded package(s). "only-if-needed" - are
117 upgraded only when they do not satisfy the requirements of the
118 upgraded package(s).
119
120 --force-reinstall
121 Reinstall all packages even if they are already up-to-date.
122
123 -I, --ignore-installed
124 Ignore the installed packages, overwriting them. This can break
125 your system if the existing package is of a different version or
126 was installed with a different package manager!
127
128 --ignore-requires-python
129 Ignore the Requires-Python information.
130
131 --no-build-isolation
132 Disable isolation when building a modern source distribution.
133 Build dependencies specified by PEP 518 must be already in‐
134 stalled if this option is used.
135
136 --use-pep517
137 Use PEP 517 for building source distributions (use
138 --no-use-pep517 to force legacy behaviour).
139
140 --check-build-dependencies
141 Check the build dependencies when PEP517 is used.
142
143 --break-system-packages
144 Allow pip to modify an EXTERNALLY-MANAGED Python installation
145
146 -C, --config-settings <settings>
147 Configuration settings to be passed to the PEP 517 build back‐
148 end. Settings take the form KEY=VALUE. Use multiple --con‐
149 fig-settings options to pass multiple keys to the backend.
150
151 --global-option <options>
152 Extra global options to be supplied to the setup.py call before
153 the install or bdist_wheel command.
154
155 --compile
156 Compile Python source files to bytecode
157
158 --no-compile
159 Do not compile Python source files to bytecode
160
161 --no-warn-script-location
162 Do not warn when installing scripts outside PATH
163
164 --no-warn-conflicts
165 Do not warn about broken dependencies
166
167 --no-binary <format_control>
168 Do not use binary packages. Can be supplied multiple times, and
169 each time adds to the existing value. Accepts either ":all:" to
170 disable all binary packages, ":none:" to empty the set (notice
171 the colons), or one or more package names with commas between
172 them (no colons). Note that some packages are tricky to compile
173 and may fail to install when this option is used on them.
174
175 --only-binary <format_control>
176 Do not use source packages. Can be supplied multiple times, and
177 each time adds to the existing value. Accepts either ":all:" to
178 disable all source packages, ":none:" to empty the set, or one
179 or more package names with commas between them. Packages without
180 binary distributions will fail to install when this option is
181 used on them.
182
183 --prefer-binary
184 Prefer older binary packages over newer source packages.
185
186 --require-hashes
187 Require a hash to check each requirement against, for repeatable
188 installs. This option is implied when any package in a require‐
189 ments file has a --hash option.
190
191 --progress-bar <progress_bar>
192 Specify whether the progress bar should be used [on, off] (de‐
193 fault: on)
194
195 --root-user-action <root_user_action>
196 Action if pip is run as a root user. By default, a warning mes‐
197 sage is shown.
198
199 --report <file>
200 Generate a JSON file describing what pip did to install the pro‐
201 vided requirements. Can be used in combination with --dry-run
202 and --ignore-installed to 'resolve' the requirements. When - is
203 used as file name it writes to stdout. When writing to stdout,
204 please combine with the --quiet option to avoid mixing pip log‐
205 ging output with JSON output.
206
207 --no-clean
208 Don't clean up build directories.
209
210
212 pip developers
213
215 The pip developers
216
217
218
219
22023.2 Aug 04, 2023 PIP-INSTALL(1)