Skip to main content

resolve_canonical_python_bin

Function resolve_canonical_python_bin 

Source
pub fn resolve_canonical_python_bin() -> String
Expand description

Resolve the canonical Python binary path.

Returns the highest-priority Python interpreter available on the system. This is the interpreter that ALL ML components will be installed to.

Resolution order:

  1. MLSTACK_PYTHON_BIN / UV_PYTHON env vars (or from ~/.mlstack_env)
  2. Active virtualenv
  3. uv-managed Python (preferred for ML workloads)
  4. System Python

Falls back to "python3" if no interpreter is found.