ID EN
Sys

base_prefix

Python 3.11

Set during Python startup, before site.py is run, to the same value as prefix. If not running in a virtual environment, the values will stay the same; if site.py finds that a virtual environment is in use, the values of prefix and exec_prefix will be changed to point to the virtual environment, whereas base_prefix and base_exec_prefix will remain pointing to the base Python installation (the one which the virtual environment was created from).

Syntax

PYTHON
sys.base_prefix

See Also

prefix virtual environment prefix exec_prefix base_prefix base_exec_prefix