Skip to content

Commit 852dedd

Browse files
authored
Merge pull request #11775 from pelson/doc/prefix-warning
Document the limitations of the pip install --prefix argument
2 parents 8b7955d + e399d7d commit 852dedd

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

news/11775.doc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Cross-reference the ``--python`` flag from the ``--prefix`` flag,
2+
and mention limitations of ``--prefix`` regarding script installation.

src/pip/_internal/commands/install.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,12 @@ def add_options(self) -> None:
156156
default=None,
157157
help=(
158158
"Installation prefix where lib, bin and other top-level "
159-
"folders are placed"
159+
"folders are placed. Note that the resulting installation may "
160+
"contain scripts and other resources which reference the "
161+
"Python interpreter of pip, and not that of ``--prefix``. "
162+
"See also the ``--python`` option if the intention is to "
163+
"install packages into another (possibly pip-free) "
164+
"environment."
160165
),
161166
)
162167

0 commit comments

Comments
 (0)