3.6 Conda Environment Best Practices
This section highlights the best practices for creating conda environments in OML4R to prevent R and third/fourth-party dependency conflicts.
R Version
versionNote:
To prevent dependency conflicts, you can create a new environment
and install all required packages simultaneously using the
create command. This allows the
solver to resolve all dependencies at once.
Admin Task: Create and Upload a Conda Environment
Use the create command to create a Conda environment named myrenv to install the forecast package. Specify the R version using the R parameter. Use the upload command to upload the myrenv environment to the Object Storage associated with the Autonomous AI Database instance for an OML user to download and use it.
%conda
create -n myrenv -c conda-forge --override-channels --strict-channel-priority r-base=4.0.5 r-forecast
upload myrenv --overwrite -t application "OML4R"OML User: Use a Conda Enviroment
%conda
download myrenv
activate myrenvforecast library:%r
library(forecast)Parent topic: Install third-party packages