Installs Python packages from pre-downloaded wheel files (offline installation). This is useful for air-gapped servers without internet access.
Details
The function supports two formats:
A .zip file (e.g., "linux_x86_64.zip") containing wheel files
A directory containing .whl files directly
For offline installation:
Download wheel files on a machine with internet access
Copy the packages folder to the offline server
Run this function to install from local files
Examples
if (FALSE) { # \dontrun{
packagesDir <- Sys.getenv("COHORT_CONTRAST_WHEELS")
if (interactive() &&
requireNamespace("reticulate", quietly = TRUE) &&
nzchar(packagesDir) &&
dir.exists(packagesDir)) {
configurePython(createVenv = FALSE)
installPythonDepsOffline(packagesDir = packagesDir)
}
} # }