Install Python Dependencies Offline
installPythonDepsOffline.RdInstalls Python packages from pre-downloaded wheel files (offline installation). This is useful for air-gapped servers without internet access.
Usage
installPythonDepsOffline(
packagesDir = NULL,
platform = "linux_x86_64",
cleanup = TRUE,
...
)Arguments
- packagesDir
Path to directory containing wheel files or a .zip archive. This argument is required in CRAN builds.
- platform
Platform identifier. Default is "linux_x86_64".
- cleanup
Logical. If TRUE, removes extracted files after installation. Default is TRUE.
- ...
Backward-compatible alias: `packages_dir`.
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{
# Install from custom location
configurePython(createVenv = FALSE)
installPythonDepsOffline(packagesDir = "/path/to/packages")
} # }