]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.8] [doc] Document VIRTUAL_ENV environment variable (GH-21970) (GH-24363)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 1 Mar 2021 15:07:31 +0000 (07:07 -0800)
committerGitHub <noreply@github.com>
Mon, 1 Mar 2021 15:07:31 +0000 (15:07 +0000)
(cherry picked from commit 3584d4b64a5373440f78237eac734831cfd83f79)

Doc/using/venv-create.inc

index c81aaf15d885a21d99f32e9ceb61cceebdced76c..b4089e61fa7b32d9063ecdd09980ae072574df98 100644 (file)
@@ -121,6 +121,10 @@ directory containing the virtual environment):
 |             | PowerShell      | PS C:\\> <venv>\\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