Skip to contents

Initialize anaconda environment used for python backend

Usage

init_env(env_name = "r-lionfish", virtual_env = "virtual_env", local = FALSE)

Arguments

env_name

a string that defines the name of the python environment reticulate uses. This can be useful if one wants to use a preinstalled python environment.

virtual_env

either "virtual_env" or "anaconda". "virtual_env" creates a virtual environment, which has the advantage that the GUI looks much nicer and no previous python installation is required,but the setup of the environment can be more error prone. "anaconda" installs the python environment via Anaconda, which can be more stable, but the GUI looks more dated.

Value

Examples

init_env(env_name="r-lionfish", virtual_env = "virtual_env")
#> Installing pyenv ...
#> Done! pyenv has been installed to '/home/runner/.local/share/r-reticulate/pyenv/bin/pyenv'.
#> + /home/runner/.local/share/r-reticulate/pyenv/bin/pyenv update
#> + /home/runner/.local/share/r-reticulate/pyenv/bin/pyenv install --skip-existing 3.12.3
#> Error in stop_no_virtualenv_starter(version = version, python = python): Suitable Python installation for creating a venv not found.
#>   Requested Python: /home/runner/.pyenv/versions/3.12.3/bin/python3.12
#> Please install Python with one of following methods:
#> - https://github.com/rstudio/python-builds/
#> - reticulate::install_python(version = '<version>')