Skip to contents

Use one of these objects as ConsoleConfig(python = ...). ExistingPython() uses preinstalled packages in an interpreter or standard virtual environment. ManagedPython() prepares a uv-managed environment. It does not fall back to a system interpreter when managed preparation is unavailable.

Usage

ExistingPython(existing = character(0))

ManagedPython(version = NULL, packages = NULL, resolution = NULL)

FirstAvailablePython(first_available = list())

Arguments

existing

Path to a Python executable or standard virtual environment, such as .venv. Console retains the environment's interpreter spelling, captures selection at launch, and rejects unsupported Conda installations.

version

NULL or one Python version or supported constraint string, such as "3.13" or ">=3.12,<3.14".

packages

NULL for bundled defaults, or a character vector replacing optional startup packages. character() requests no optional packages.

resolution

NULL (defaulting to "explicit"), "implicit", "explicit", or "fixed". To use preinstalled packages without preparation, choose ExistingPython().

first_available

A nonempty list of ExistingPython() candidates, optionally one "active_venv" and a final ManagedPython() candidate. Only absent paths are skipped; present but unusable environments fail.

Value

An S7 configuration object. The constructor is also its S7 class.

Examples

ExistingPython(".venv")
ManagedPython(version = "3.13", packages = "pandas", resolution = "explicit")