1
0
mirror of https://github.com/jbranchaud/til synced 2026-03-04 15:08:45 +00:00

Add Install With PIP For Specific Interpreter as a Python TIL

This commit is contained in:
jbranchaud
2026-02-16 14:40:27 -06:00
parent efb83050ab
commit be18f387ed
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
# Install With PIP For Specific Interpreter
The `pip` module can be invoked for any of its commands, such as install, using
a specific Python interpreter like so:
```bash
$ python3 -m pip install black
```
This avoid ambiguity between the version of Python I am using and version of the
package manager I'm using.
Similarly if I need to upgrade `pip`, I can do the following:
```bash
$ python3 -m pip install --upgrade pip
```