mirror of https://github.com/tiangolo/fastapi.git
📝 Add tip on how to install `pip` in case of `No module named pip` error in `virtual-environments.md` (#14211)
This commit is contained in:
parent
2ca7709c24
commit
00b97526e7
|
|
@ -242,6 +242,26 @@ $ python -m pip install --upgrade pip
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
/// tip
|
||||||
|
|
||||||
|
Sometimes, you might get a **`No module named pip`** error when trying to upgrade pip.
|
||||||
|
|
||||||
|
If this happens, install and upgrade pip using the command below:
|
||||||
|
|
||||||
|
<div class="termy">
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ python -m ensurepip --upgrade
|
||||||
|
|
||||||
|
---> 100%
|
||||||
|
```
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
This command will install pip if it is not already installed and also ensures that the installed version of pip is at least as recent as the one available in `ensurepip`.
|
||||||
|
|
||||||
|
///
|
||||||
|
|
||||||
## Add `.gitignore` { #add-gitignore }
|
## Add `.gitignore` { #add-gitignore }
|
||||||
|
|
||||||
If you are using **Git** (you should), add a `.gitignore` file to exclude everything in your `.venv` from Git.
|
If you are using **Git** (you should), add a `.gitignore` file to exclude everything in your `.venv` from Git.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue