Skip to content

Commit 1437498

Browse files
committed
Clarify where Python looks for pyvenv.cfg
1 parent e5b7e8e commit 1437498

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎source/specifications/virtual-environments.rst‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ of installed Python packages in its site directories, but shares the standard
1212
library with the base installed Python.
1313

1414
A Python interpreter detects whether it is in a virtual environment by looking
15-
for a ``pyvenv.cfg`` file one or two levels above its executable (without
16-
resolving symlinks). The ``pyvenv.cfg`` needs to have at least a ``home`` key
17-
to declare a virtual environment.
15+
for a ``pyvenv.cfg`` file in the directory containing its executable or in that
16+
directory's parent, without resolving symlinks to the executable. The
17+
``pyvenv.cfg`` needs to have at least a ``home`` key to declare a virtual
18+
environment.
1819

1920

2021
Runtime detection of virtual environments

0 commit comments

Comments
 (0)