Sets up a Python environment with specified packages for DEGAS screening methods. This function can create new environments or reuse existing ones, supporting both Conda and venv environment types. It ensures all required dependencies are properly installed and verified.
Default method for unsupported environment types. Throws an informative error with supported environment types.
Value
A data frame containing verification results for the environment setup, including installation status of all required packages. Invisibly returns the verification results.
Details
This function provides a comprehensive solution for Python environment management in R projects, particularly for machine learning workflows requiring TensorFlow. Key features include:
Environment Creation: Automatically creates new environments or reuses existing ones with the same name
Package Management: Installs specified Python packages with version pinning support
Verification: Validates environment setup and package installations
Flexible Methods: Supports different backend methods for environment creation (reticulate vs system calls)
The function uses S3 method dispatch to handle different environment types, allowing for extensible support of additional environment managers in the future.
See also
reticulate::conda_create(), reticulate::virtualenv_create() for
underlying environment creation functions.