Tools for managing Python
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_search( matchspec, forge = TRUE, channel = character(), conda = "auto", ... )
The path to a
conda executable. Use
"auto" to allow
reticulate to automatically find an appropriate
See Finding Conda and
conda_binary() for more details.
The name of, or path to, a conda environment.
A character vector, indicating package names which should be
installed or removed. Use
<package>==<version> to request the installation
of a specific version of a package. A
NULL value for
will be interpretted to
"--all", removing the entire environment.
Optional arguments, reserved for future expansion.
Boolean; include the conda-forge repository?
An optional character vector of conda channels to include.
When specified, the
forge argument is ignored. If you need to
specify multiple channels, including the conda forge, you can use
c("conda-forge", <other channels>).
The path to an environment definition, generated via
conda_export(), or via
conda env export. When provided,
the conda environment will be created using this environment definition,
and other arguments will be ignored.
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.
The name of the conda environment to be cloned.
The path where the conda environment definition will be written.
Boolean; should the environment definition be written as JSON? By default, conda exports environments as YAML.
pip for package installation? By default, packages
are installed from the active conda channels.
An optional character vector of additional command line
arguments to be passed to
pip. Only relevant when
pip = TRUE.
Ignore already-installed versions when using pip?
FALSE). Set this to
TRUE so that specific package versions
can be installed even if they are downgrades. The
FALSE option is useful
for situations where you don't want a pip install to attempt an overwrite of
a conda binary package (e.g. SciPy on Windows which is very difficult to
install via pip due to compilation requirements).
Boolean; report all instances of Python found?
A conda MatchSpec query string.
conda_list() returns an R
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_export() returns the path to the exported environment definition,
conda_search() returns an R
data.frame describing packages that
matchspec. The data frame will usually include
name giving the package name,
version giving the package
build giving the package build, and
channel giving the
channel the package is hosted on.
reticulate's conda APIs accept a
conda parameter, used to control
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,
miniconda_path() location (if it exists),
A set of pre-defined locations where conda is typically installed.
reticulate to use a particular
conda binary, we recommend
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.