R/setup_py_env_deprecated.R
deprecated.setup_py_env.RdThis function ensures that a suitable Python environment (virtualenv or conda) is available and that 'torch' and 'numpy' are installed within it. Users should run this once before using functions that rely on PyTorch.
deprecated.setup_py_env(
method = c("conda", "virtualenv"),
envname = "FastPCA",
cuda = FALSE,
...
)Character string. The method to use for environment creation. Can be "virtualenv" (default) or "conda".
Character string. The name of the Python environment to create/use. Defaults to "FastPCA".
Additional arguments passed to reticulate::virtualenv_create()
or reticulate::conda_create().
Character string. The Python version to use (e.g., "3.9"). Defaults to "3.9". It's recommended to stick to well-supported versions.
Invisibly returns TRUE if setup is successful, FALSE otherwise.
if (FALSE) { # \dontrun{
#for conda
FastPCA::setup_py_env(method = "conda")
#reticulate virtualenv:
FastPCA::setup_py_env()
} # }