Skip to main content

Module python

Module python 

Source
Expand description

Which Python runs model code, and the managed environment for data-analysis packages.

Order: $BYOB_PYTHON, then the managed venv <data>/python/venv (created by install_python_packages with uv), then python3 / python on PATH.

Structs§

Python
A resolved interpreter.

Constants§

PYTHON_ENV
Overrides the interpreter.

Functions§

managed_root
The managed environment’s folder under the byob data folder.
managed_venv
system_python
python3 (or python) on PATH, ignoring $BYOB_PYTHON and the managed venv.
valid_requirement
A package requirement the model may ask for: a name with optional extras and version constraints (pandas, scikit-learn>=1.4, xarray[io]). No URLs, paths or options.
venv_python
which
The first executable name on PATH (or name itself if it’s a path).