Skip to contents

Installs the required Python packages for the CohortContrast Viewer.

Usage

installPythonDeps(upgrade = FALSE, quiet = FALSE, user = NULL)

Arguments

upgrade

Logical. If TRUE, upgrades existing packages. Default is FALSE.

quiet

Logical. If TRUE, suppresses pip output. Default is FALSE.

user

Logical. If TRUE, installs to user site-packages (–user flag). Useful when not using a virtual environment. Default is NULL (auto-detect).

Value

Invisibly returns TRUE if installation was successful.

Examples

if (FALSE) { # \dontrun{
if (interactive() &&
    requireNamespace("reticulate", quietly = TRUE) &&
    (nzchar(Sys.which("python3")) || nzchar(Sys.which("python")))) {
  configurePython(createVenv = FALSE)
  installPythonDeps(user = TRUE)
}
} # }