From 9db9ae0f0e021130683a66cac6bae730f841fbd1 Mon Sep 17 00:00:00 2001 From: Andre Delfino Date: Tue, 1 Sep 2020 03:07:29 -0300 Subject: [PATCH] [doc] Document VIRTUAL_ENV environment variable (GH-21970) (cherry picked from commit 3584d4b64a5373440f78237eac734831cfd83f79) Co-authored-by: Andre Delfino --- 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 c81aaf15d885a2..b4089e61fa7b32 100644 --- a/Doc/using/venv-create.inc +++ b/Doc/using/venv-create.inc @@ -121,6 +121,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