diff options
author | Andre Delfino <adelfino@gmail.com> | 2020-09-01 06:07:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-01 06:07:29 (GMT) |
commit | 3584d4b64a5373440f78237eac734831cfd83f79 (patch) | |
tree | ba36b6dd654e9d54f271a3f2559763efd1df778f /Doc/using | |
parent | ea5a6363c3f8cc90b7c0cc573922b10f296073b6 (diff) | |
download | cpython-3584d4b64a5373440f78237eac734831cfd83f79.zip cpython-3584d4b64a5373440f78237eac734831cfd83f79.tar.gz cpython-3584d4b64a5373440f78237eac734831cfd83f79.tar.bz2 |
[doc] Document VIRTUAL_ENV environment variable (GH-21970)
Diffstat (limited to 'Doc/using')
-rw-r--r-- | Doc/using/venv-create.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc index c8f6e8f..8f850a7 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:\\> <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 |