Browse Source

Update virtual-environments.md

Added a command to install pip in case a common error "No module named pip" occurs.
pull/14209/head
zadevhub 9 months ago
committed by GitHub
parent
commit
628c5e36ec
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 20
      docs/en/docs/virtual-environments.md

20
docs/en/docs/virtual-environments.md

@ -242,6 +242,26 @@ $ python -m pip install --upgrade pip
</div>
/// tip
If you've created the virtual environment using `uv` above. Then, while running the command above to upgrade pip, you may get an error **`No module named pip`**.
In that case, you can install and upgrade pip using the command:
<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 }
If you are using **Git** (you should), add a `.gitignore` file to exclude everything in your `.venv` from Git.

Loading…
Cancel
Save