Learn R Programming

DeepLearningCausal (version 0.0.107)

python_ready: Check for Python module availability and install if missing.

Description

Call this to manually set up Python and dependencies. The function checks if Python is available via the reticulate package, and if not, it creates a virtual environment and installs the specified Python modules.

Usage

python_ready(
  modules = c("keras", "tensorflow", "numpy"),
  envname = "r-reticulate"
)

Value

Invisibly returns TRUE if setup is complete.

Arguments

modules

Character vector of Python modules to check for and install if missing.

envname

Name of the virtual environment to use or create. Defaults to "r-reticulate".

Examples

Run this code
if (FALSE) {
python_ready(modules = c("keras", "tensorflow", "numpy"),
            envname = "r-reticulate")
}

Run the code above in your browser using DataLab