Install PyTorch and its dependencies
install_pytorch(
method = c("conda", "virtualenv", "auto"),
conda = "auto",
version = "default",
envname = "r-torch",
extra_packages = NULL,
restart_session = TRUE,
conda_python_version = "3.6",
pip = FALSE,
channel = "stable",
cuda_version = NULL,
dry_run = FALSE,
...
)
Installation method. By default, "auto" automatically finds a method that will work in the local environment. Change the default to force a specific installation method. Note that the "virtualenv" method is not available on Windows (as this isn't supported by PyTorch). Note also that since this command runs without privillege the "system" method is available only on Windows.
The path to a conda
executable. Use "auto"
to allow reticulate
to
automatically find an appropriate conda
binary. See Finding Conda for more details.
PyTorch version to install. The "default" version is 1.4.
You can specify a specific PyTorch version with version="1.2"
,
or version="1.6"
.
Name of Python or conda environment to install within.
The default environment name is r-torch
.
Additional Python packages to install along with
PyTorch. If more than one package use a character vector:
c("pandas", "matplotlib")
.
Restart R session after installing (note this will only occur within RStudio).
the Python version installed in the created conda
environment. Python 3.4 is installed by default. But you could specify for instance:
conda_python_version="3.7"
.
logical
conda channel. The default channel is stable
.
The alternative channel is nightly
.
string for the cuda toolkit version to install. For example,
to install a specific CUDA version use cuda_version="10.2"
.
logical, set to TRUE for unit tests, otherwise will execute the command.
other arguments passed to reticulate::conda_install()
or
reticulate::virtualenv_install()
.