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

View source: R/py_setup.R

python_readyR Documentation

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"
)

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".

Value

Invisibly returns TRUE if setup is complete.

Examples

## Not run: 
python_ready(modules = c("keras", "tensorflow", "numpy"),
            envname = "r-reticulate")

## End(Not run)

DeepLearningCausal documentation built on Nov. 6, 2025, 5:08 p.m.