Install requirements (i.e. Python packages) for RKeOps to work.
Usage
install_rkeops(
envname = NULL,
method = c("auto", "virtualenv", "conda"),
conda = "auto",
python_version = NULL,
pip = FALSE,
...,
pip_ignore_installed = ignore_installed,
ignore_installed = FALSE
)Arguments
- envname
The name, or full path, of the environment in which Python packages are to be installed. When
NULL(the default), the active environment as set by theRETICULATE_PYTHON_ENVvariable will be used; if that is unset, then ther-reticulateenvironment will be used.- method
Installation method. By default, "auto" automatically finds a method that will work in the local environment. Change the default to force a specific installation method. Note that the "virtualenv" method is not available on Windows.
- conda
The path to a
condaexecutable. Use"auto"to allowreticulateto automatically find an appropriatecondabinary. See Finding Conda andconda_binary()for more details.- python_version
The requested Python version. Ignored when attempting to install with a Python virtual environment.
- pip
Boolean; use
pipfor package installation? This is only relevant when Conda environments are used, as otherwise packages will be installed from the Conda repositories.- ...
Additional arguments passed to
conda_install()orvirtualenv_install().- pip_ignore_installed, ignore_installed
Boolean; whether pip should ignore previously installed versions of the requested packages. Setting this to
TRUEcauses pip to install the latest versions of all dependencies into the requested environment. This ensure that no dependencies are satisfied by a package that exists either in the site library or was previously installed from a different--potentially incompatible--distribution channel. (ignore_installedis an alias forpip_ignore_installed,pip_ignore_installedtakes precedence).
Details
RKeOps now uses PyKeOps Python package under the hood thanks to the
reticulate R package that
provides an "R Interface to Python".
We recommend to use a dedicated Python environment (through reticulate)
to install and use RKeOps Python dependencies.
install_rkeops() is just a wrapper around reticulate::py_install()
and takes the same input arguments.
See the specific "Using RKeOps" article
or the corresponding vignette: vignette("using_rkeops", package = "rkeops")
Important: Python is a requirement as an intern machinery for the package to work but you will not need to create nor manipulate Python codes to use the RKeOps package.
Examples
if (FALSE) {
## setup Python virtual environment
# create Python virtualenv
reticulate::virtualenv_create("rkeops")
# activate python environment
reticulate::use_virtualenv(virtualenv = "rkeops", required = TRUE)
## install rkeops requirements in Python virtual environment
install_rkeops()
## check install
check_rkeops()
}