From 8803dc730874bded6f705ec622814386fa106474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Wed, 26 Aug 2020 19:43:06 -0300 Subject: [PATCH] Document VIRTUAL_ENV env var --- Doc/using/venv-create.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc index c8f6e8f87d5674..8f850a74d413ce 100644 --- a/Doc/using/venv-create.inc +++ b/Doc/using/venv-create.inc @@ -126,6 +126,10 @@ directory containing the virtual environment): | | PowerShell | PS C:\\> \\Scripts\\Activate.ps1 | +-------------+-----------------+-----------------------------------------+ +When a virtual environment is active, the :envvar:`VIRTUAL_ENV` environment +variable is set to the path of the virtual environment. This can be used to +check if one is running inside a virtual environment. + You don't specifically *need* to activate an environment; activation just prepends the virtual environment's binary directory to your path, so that "python" invokes the virtual environment's Python interpreter and you can run