Skip to content

Commit ddfa05c

Browse files
committed
Merge branch 'python_option' of https://github.com/pfmoore/pip into python_option
2 parents b6be01a + d0b5a8f commit ddfa05c

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

docs/html/topics/python-option.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Managing a different Python interpreter
22

3+
```{versionadded} 22.3
4+
```
35

46
Occasionally, you may want to use pip to manage a Python installation other than
57
the one pip is installed into. In this case, you can use the `--python` option
@@ -16,22 +18,12 @@ environment.
1618
One example of where this might be useful is to manage a virtual environment
1719
that does not have pip installed.
1820

19-
````{tab} Unix/macOS
20-
```{code-block} console
21+
```{pip-cli}
2122
$ python -m venv .venv --without-pip
22-
$ python -m pip --python .venv install SomePackage
23-
[...]
24-
Successfully installed SomePackage
25-
```
26-
````
27-
````{tab} Windows
28-
```{code-block} console
29-
C:\> py -m venv .venv --without-pip
30-
C:\> py -m pip --python .venv install SomePackage
23+
$ pip --python .venv install SomePackage
3124
[...]
3225
Successfully installed SomePackage
3326
```
34-
````
3527

3628
You could also use `--python .venv/bin/python` (or on Windows,
3729
`--python .venv\Scripts\python.exe`) if you wanted to be explicit, but the

0 commit comments

Comments
 (0)