From: zadevhub <138465437+zadevhub@users.noreply.github.com> Date: Tue, 2 Dec 2025 05:09:25 +0000 (+0000) Subject: 📝 Add tip on how to install `pip` in case of `No module named pip` error in `virtual... X-Git-Tag: 0.123.2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00b97526e753614e762cad9128df5df48cb0fd54;p=thirdparty%2Ffastapi%2Ffastapi.git 📝 Add tip on how to install `pip` in case of `No module named pip` error in `virtual-environments.md` (#14211) --- diff --git a/docs/en/docs/virtual-environments.md b/docs/en/docs/virtual-environments.md index e9b0a9fc45..c02e43ab91 100644 --- a/docs/en/docs/virtual-environments.md +++ b/docs/en/docs/virtual-environments.md @@ -242,6 +242,26 @@ $ python -m pip install --upgrade pip +/// 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: + +
+ +```console +$ python -m ensurepip --upgrade + +---> 100% +``` + +
+ +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.