Sets up a persistent Python virtual environment containing the tabpfn
Python library so that tab_pfn() and friends can use it. By default the
environment is named "r-tabpfn", which reticulate automatically discovers
and prefers over an ephemeral environment (see the Environment discovery
section).
Arguments
- version
The
tabpfnversion to install. Use"default"(orNULL) to install the latest release, a bare version string such as"2.0.9"to pin an exact version, or a full pip specification such as">=2.0".- envname
The name of the Python virtual environment to create or use. The default,
"r-tabpfn", is auto-discovered by reticulate.- check_latest
A logical. When
TRUE(the default) and no explicitversionis given, an existing environment is compared against the latest release on PyPI and you are asked whether to upgrade. Set toFALSEto skip this check (useful when intentionally staying on an older version).- extra_packages
An optional character vector of additional Python packages to install alongside
tabpfn.- python_version
An optional Python version to use for the environment.
- method
The installation method, passed to
reticulate::py_install().- new_env
A logical. When
TRUE, an existing environment namedenvnameis removed and rebuilt from scratch. Defaults toTRUEonly for the canonical"r-tabpfn"environment.- restart_session
A logical. When
TRUE(the default) and running in RStudio, the R session is restarted after installation so the new environment takes effect.- ...
Additional arguments passed to
reticulate::py_install().
Environment discovery
Because the package calls reticulate::import("tabpfn"), reticulate will
automatically use a virtual environment named "r-tabpfn" if one exists,
preferring it over the ephemeral environment that is otherwise created on
demand. Environments selected via RETICULATE_PYTHON, VIRTUAL_ENV, or a
project-local .venv take precedence over "r-tabpfn".
