setup_python_deps: Set up Python dependencies for epiworldRcalibrate
Description
This function declares Python requirements through
\'reticulate\' using \'py_require()\' (uv-backed in reticulate >= 1.41),
then validates imports for all required modules (numpy, scikit-learn,
joblib, PyTorch). Run this once after installing the package. This is kept
separate from model functions so that package installation never happens
automatically during normal use.
Usage
setup_python_deps(force = FALSE)
Value
Invisibly returns TRUE on success.
Arguments
force
Logical; if TRUE, resets package-managed Python
requirements from a fresh R session. Default is FALSE.
Details
The function performs the following steps:
Declares requirements with reticulate::py_require().
Initializes Python through reticulate's managed environment.
if (FALSE) {
# First-time setup (run once after installing the package)setup_python_deps()
# Force reinstall if something went wrongsetup_python_deps(force = TRUE)
}