create_conda_env: Create a Conda environment if needed.

View source: R/create_conda_env.R

create_conda_envR Documentation

Create a Conda environment if needed.

Description

Create a Conda environment if needed. If that environment already exists, nothing happens.

Usage

create_conda_env(
  ormr_folder_name = get_default_ormr_folder_name(),
  python_version = get_default_python_version(),
  verbose = FALSE
)

Arguments

ormr_folder_name

can be either python3 or the name of the folder where ormr installs all Python environments and packages.

python_version

the Python version, which is 3.6 by default (thanks to https://stackoverflow.com/a/69978354), as ormr is a sub-package for gcaer, where the latter needs to install the Python tensorflow package. For more recent Python versions, this install fails.

verbose

the verbosity of a function. Set to TRUE for more output. Use check_verbose to detect if this argument is valid.

Value

Nothing

Note

the output of this function cannot be silenced, thanks to install_miniconda

Author(s)

Richèl J.C. Bilderbeek

Examples

if (is_conda_installed()) {
  # Install to a temporary folder
  ormr_folder_name <- tempfile()
  create_conda_env(ormr_folder_name = ormr_folder_name)

  # Clean up
  unlink(ormr_folder_name, recursive = TRUE)
}

richelbilderbeek/ormr documentation built on May 23, 2022, 1:15 p.m.