]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Add tip on how to install `pip` in case of `No module named pip` error in `virtual...
authorzadevhub <138465437+zadevhub@users.noreply.github.com>
Tue, 2 Dec 2025 05:09:25 +0000 (05:09 +0000)
committerGitHub <noreply@github.com>
Tue, 2 Dec 2025 05:09:25 +0000 (06:09 +0100)
docs/en/docs/virtual-environments.md

index e9b0a9fc454bfc9f867ce3b1a14cbfec792aa17b..c02e43ab9171b340c2c6c158a30d4d0160b6f035 100644 (file)
@@ -242,6 +242,26 @@ $ python -m pip install --upgrade pip
 
 </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 }
 
 If you are using **Git** (you should), add a `.gitignore` file to exclude everything in your `.venv` from Git.