| conda-tools {reticulate} | R Documentation |
Tools for managing Python conda environments.
conda_list(conda = "auto") conda_create( envname = NULL, packages = NULL, ..., forge = TRUE, channel = character(), environment = NULL, conda = "auto", python_version = miniconda_python_version() ) conda_clone(envname, ..., clone = "base", conda = "auto") conda_export( envname, file = if (json) "environment.json" else "environment.yml", json = FALSE, ..., conda = "auto" ) conda_remove(envname, packages = NULL, conda = "auto") conda_install( envname = NULL, packages, forge = TRUE, channel = character(), pip = FALSE, pip_options = character(), pip_ignore_installed = FALSE, conda = "auto", python_version = NULL, ... ) conda_binary(conda = "auto") conda_exe(conda = "auto") conda_version(conda = "auto") conda_update(conda = "auto") conda_python(envname = NULL, conda = "auto", all = FALSE)
conda |
The path to a |
envname |
The name of, or path to, a conda environment. |
packages |
A character vector, indicating package names which should be
installed or removed. Use |
... |
Optional arguments, reserved for future expansion. |
forge |
Boolean; include the conda-forge repository? |
channel |
An optional character vector of conda channels to include.
When specified, the |
environment |
The path to an environment definition, generated via
(for example) |
python_version |
The version of Python to be installed. Set this if you'd like to change the version of Python associated with a particular conda environment. |
clone |
The name of the conda environment to be cloned. |
file |
The path where the conda environment definition will be written. |
json |
Boolean; should the environment definition be written as JSON? By default, conda exports environments as YAML. |
pip |
Boolean; use |
pip_options |
An optional character vector of additional command line
arguments to be passed to |
pip_ignore_installed |
Ignore already-installed versions when using pip?
(defaults to |
all |
Boolean; report all instances of Python found? |
conda_list() returns an R data.frame, with name giving the name of
the associated environment, and python giving the path to the Python
binary associated with that environment.
conda_create() returns the path to the Python binary associated with the
newly-created conda environment.
conda_clone() returns the path to Python within the newly-created
conda environment.
conda_export() returns the path to the exported environment definition,
invisibly.
Most of reticulate's conda APIs accept a conda parameter, used to control
the conda binary used in their operation. When conda = "auto",
reticulate will attempt to automatically find a conda installation.
The following locations are searched, in order:
The location specified by the reticulate.conda_binary R option,
The location specified by the RETICULATE_CONDA environment variable,
The miniconda_path() location (if it exists),
The program PATH,
A set of pre-defined locations where conda is typically installed.
To force reticulate to use a particular conda binary, we recommend
setting:
options(reticulate.conda_binary = "/path/to/conda")
This can be useful if your conda installation lives in a location that
reticulate is unable to automatically discover.