Skip to main content

python_interpreters

Function python_interpreters 

Source
pub fn python_interpreters() -> Vec<PathBuf>
Expand description

Discover Python interpreter paths in priority order, deduplicated.

Returns only paths that exist on the filesystem. The order is: 0. The managed global env (~/.mlstack/global/bin/python) — deterministic anchor

  1. MLSTACK_PYTHON_BIN / UV_PYTHON env vars
  2. Active virtualenv (VIRTUAL_ENV/bin/python)
  3. Conda environment (CONDA_PREFIX/bin/python)
  4. Component venvs relative to user home (rocm_venv, etc.)
  5. System Pythons (/usr/bin/python3.*, /usr/local/bin/python3)