Skip to contents

This functions checks for python and a specified environment. If the environment exists it will be activated. If python is already initialized it uses the current environment.

Usage

prepare_session(env_type = "auto", envname = "aifeducation")

Arguments

env_type

string If set to "venv" virtual environment is requested. If set to "conda" a 'conda' environment is requested. If set to "auto" the function tries to activate a virtual environment with the given name. If this environment does not exist it tries to activate a conda environment with the given name. If this fails the default virtual environment is used.

envname

string envname name of the requested environment.

Value

Function does not return anything. It is used for preparing python and R.