File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change 1
1
# Managing a different Python interpreter
2
2
3
+ ``` {versionadded} 22.3
4
+ ```
3
5
4
6
Occasionally, you may want to use pip to manage a Python installation other than
5
7
the one pip is installed into. In this case, you can use the ` --python ` option
@@ -16,22 +18,12 @@ environment.
16
18
One example of where this might be useful is to manage a virtual environment
17
19
that does not have pip installed.
18
20
19
- ```` {tab} Unix/macOS
20
- ```{code-block} console
21
+ ``` {pip-cli}
21
22
$ 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
31
24
[...]
32
25
Successfully installed SomePackage
33
26
```
34
- ````
35
27
36
28
You could also use ` --python .venv/bin/python ` (or on Windows,
37
29
` --python .venv\Scripts\python.exe ` ) if you wanted to be explicit, but the
You can’t perform that action at this time.
0 commit comments