From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 30 Jan 2021 10:38:44 +0000 (-0800) Subject: [doc] Document VIRTUAL_ENV environment variable (GH-21970) X-Git-Tag: v3.9.2rc1~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08867a0bfc756b40b1d889b4edccc8137a291e81;p=thirdparty%2FPython%2Fcpython.git [doc] Document VIRTUAL_ENV environment variable (GH-21970) (cherry picked from commit 3584d4b64a5373440f78237eac734831cfd83f79) Co-authored-by: Andre Delfino --- diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc index 5e724cd5794c..ddb36f94667d 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