[Python-checkins] [doc] Document VIRTUAL_ENV environment variable (GH-21970)

Andre Delfino webhook-mailer at python.org
Tue Sep 1 02:07:39 EDT 2020


https://github.com/python/cpython/commit/3584d4b64a5373440f78237eac734831cfd83f79
commit: 3584d4b64a5373440f78237eac734831cfd83f79
branch: master
author: Andre Delfino <adelfino at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-09-01T07:07:29+01:00
summary:

[doc] Document VIRTUAL_ENV environment variable (GH-21970)

files:
M Doc/using/venv-create.inc

diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc
index c8f6e8f87d567..8f850a74d413c 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



More information about the Python-checkins mailing list