Skip to content

Commit 6900a51

Browse files
[3.8] [doc] Document VIRTUAL_ENV environment variable (GH-21970) (GH-24363)
(cherry picked from commit 3584d4b)
1 parent 643939a commit 6900a51

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/using/venv-create.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ directory containing the virtual environment):
121121
| | PowerShell | PS C:\\> <venv>\\Scripts\\Activate.ps1 |
122122
+-------------+-----------------+-----------------------------------------+
123123

124+
When a virtual environment is active, the :envvar:`VIRTUAL_ENV` environment
125+
variable is set to the path of the virtual environment. This can be used to
126+
check if one is running inside a virtual environment.
127+
124128
You don't specifically *need* to activate an environment; activation just
125129
prepends the virtual environment's binary directory to your path, so that
126130
"python" invokes the virtual environment's Python interpreter and you can run

0 commit comments

Comments
 (0)