From fa2cb6b226d03b2a95df254f1a0d615086758396 Mon Sep 17 00:00:00 2001 From: dharmatech Date: Tue, 7 May 2024 14:17:08 -0700 Subject: [PATCH 1/3] Update installing-using-pip-and-virtual-environments.rst Use `Get-Command` if on PowerShell --- .../guides/installing-using-pip-and-virtual-environments.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/guides/installing-using-pip-and-virtual-environments.rst b/source/guides/installing-using-pip-and-virtual-environments.rst index 22d1840ccd..e5f07a66ab 100644 --- a/source/guides/installing-using-pip-and-virtual-environments.rst +++ b/source/guides/installing-using-pip-and-virtual-environments.rst @@ -103,7 +103,8 @@ Python interpreter: .. code-block:: bat - where python + Get-Command python # If using PowerShell + where python # If using Command Prompt While the virtual environment is active, the above command will output a filepath that includes the ``.venv`` directory, by ending with the following: From 00cf769fbe55c66a313110203eb288bfe8df4839 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Tue, 10 Nov 2026 19:31:40 +0200 Subject: [PATCH 2/3] Update source/guides/installing-using-pip-and-virtual-environments.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Éric --- .../installing-using-pip-and-virtual-environments.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/guides/installing-using-pip-and-virtual-environments.rst b/source/guides/installing-using-pip-and-virtual-environments.rst index e5f07a66ab..941f23af15 100644 --- a/source/guides/installing-using-pip-and-virtual-environments.rst +++ b/source/guides/installing-using-pip-and-virtual-environments.rst @@ -103,8 +103,12 @@ Python interpreter: .. code-block:: bat - Get-Command python # If using PowerShell - where python # If using Command Prompt + where python + +..tab:: Windows (PowerShell) + + .. code-block:: bat + Get-Command python While the virtual environment is active, the above command will output a filepath that includes the ``.venv`` directory, by ending with the following: From 6a2d9ce9cfb04bc03a0ccb3d65ce6eec50c0e48e Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Tue, 10 Nov 2026 17:41:30 +0000 Subject: [PATCH 3/3] Make the PowerShell usage consistent within that guide section --- ...ing-using-pip-and-virtual-environments.rst | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/source/guides/installing-using-pip-and-virtual-environments.rst b/source/guides/installing-using-pip-and-virtual-environments.rst index 941f23af15..8e9abfefbe 100644 --- a/source/guides/installing-using-pip-and-virtual-environments.rst +++ b/source/guides/installing-using-pip-and-virtual-environments.rst @@ -90,6 +90,12 @@ shell's ``PATH``. .venv\Scripts\activate +.. tab:: Windows (PowerShell) + + .. code-block:: powershell + + .venv\Scripts\Activate.ps1 + To confirm the virtual environment is activated, check the location of your Python interpreter: @@ -105,25 +111,15 @@ Python interpreter: where python -..tab:: Windows (PowerShell) - - .. code-block:: bat - Get-Command python +.. tab:: Windows (PowerShell) -While the virtual environment is active, the above command will output a -filepath that includes the ``.venv`` directory, by ending with the following: + .. code-block:: powershell -.. tab:: Unix/macOS + (Get-Command python).Source - .. code-block:: bash - - .venv/bin/python - -.. tab:: Windows - - .. code-block:: bat - - .venv\Scripts\python +While the virtual environment is active, the above command will output a +filepath that includes the ``.venv`` directory, ending with ``.venv/bin/python`` +on Unix/macOS or ``.venv\Scripts\python.exe`` on Windows. While a virtual environment is activated, pip will install packages into that