pyvenv.cfg reference
Every environment contains pyvenv.cfg at its root. CPython’s site
machinery reads it at startup to detect the environment and locate the base
installation. tn-venv writes the standard keys plus a small set of
documented extensions; unknown keys are ignored by consumers.
Example
home = C:\Python314
implementation = cpython
version_info = 3.14.7
include-system-site-packages = false
version = 3.14.7
prompt = 'my-project'
executable = C:\Python314\python.exe
base-executable = C:\Python314\python.exe
command = C:\Python314\python.exe -m tn_venv .venv --prompt my-project
tn-venv = 0.1.1
Standard keys
Key |
Meaning |
|---|---|
|
directory containing the base interpreter’s executable; the runtime resolves the stdlib from here |
|
|
|
|
|
only written when |
|
realpath of the base executable (stdlib venv writes this since 3.12) |
Extension keys written by tn-venv
Key |
Meaning |
|---|---|
|
|
|
full |
|
path to |
|
the full command line that created the environment, for forensics and reproduction |
|
the version of tn-venv that created the environment |
Note
home points at the directory of the base executable, per PEP 405;
executable / base-executable point at the executable file. Tools that
parse pyvenv.cfg (including CPython itself) rely on home first, so
tn-venv never deviates from the standard there.