diff --git a/.github/workflows/R_CDM_check_hades.yaml b/.github/workflows/R_CDM_check_hades.yaml index 442906e..8890173 100644 --- a/.github/workflows/R_CDM_check_hades.yaml +++ b/.github/workflows/R_CDM_check_hades.yaml @@ -54,6 +54,10 @@ jobs: - uses: r-lib/actions/setup-tinytex@v2 - uses: r-lib/actions/setup-pandoc@v2 + + - uses: actions/setup-python@v5 + with: + python-version=`3.11` - name: Install system requirements if: runner.os == 'Linux' @@ -79,15 +83,7 @@ jobs: library(reticulate) virtualenv_create("r-reticulate", Sys.which("python"), packages=python_packages) - # Detect the OS and set pip options accordingly - if (Sys.info()["sysname"] == "Darwin") { - # macOS - pip_options <- NULL - } else { - # Other OS, assume Linux or Windows needing CPU torch - pip_options <- c("--index-url https://download.pytorch.org/whl/cpu") - } - virtualenv_install("r-reticulate", "torch", pip_options = pip_options) + virtualenv_install("r-reticulate", "torch", pip_options = c("--index-url https://download.pytorch.org/whl/cpu")) path_to_python <- virtualenv_python("r-reticulate") writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python),