Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHA failure of reticulate::install_miniconda() on Windows R 3.6 #1464

Open
AshesITR opened this issue Aug 26, 2023 · 3 comments
Open

GHA failure of reticulate::install_miniconda() on Windows R 3.6 #1464

AshesITR opened this issue Aug 26, 2023 · 3 comments
Labels
reprex Can't reproduce Windows

Comments

@AshesITR
Copy link

Trying reticulate::install_miniconda() on GHA with the following matrix config fails only for windows on R 3.6.
Is this intentional? I've disabled the config for now.

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]

name: R-CMD-check

jobs:
  R-CMD-check:
    runs-on: ${{ matrix.config.os }}

    name: ${{ matrix.config.os }} (${{ matrix.config.r }})

    strategy:
      fail-fast: false
      matrix:
        config:
          - {os: macOS-latest,    r: 'release'}
          - {os: windows-latest,  r: 'release'}
          - {os: windows-latest,  r: '3.6'}
          - {os: ubuntu-latest,   r: 'devel', http-user-agent: 'release'}
          - {os: ubuntu-latest,   r: 'release'}
          - {os: ubuntu-latest,   r: 'oldrel-1'}
          - {os: ubuntu-latest,   r: 'oldrel-2'}

    env:
      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
      R_KEEP_PKG_SOURCE: yes

    steps:
      - uses: actions/checkout@v3

      - uses: r-lib/actions/setup-pandoc@v2

      - uses: r-lib/actions/setup-r@v2
        with:
          r-version: ${{ matrix.config.r }}
          http-user-agent: ${{ matrix.config.http-user-agent }}
          use-public-rspm: true

      - uses: r-lib/actions/setup-r-dependencies@v2
        with:
          extra-packages: any::rcmdcheck
          needs: check

      - name: install miniconda / tensorflow
        run: |
          reticulate::install_miniconda()
          tensorflow::install_tensorflow()
          tensorflow::tf$constant("Hellow Tensorflow")
        shell: Rscript {0}

      - uses: r-lib/actions/check-r-package@v2

From this run log.

Run reticulate::install_miniconda()
  reticulate::install_miniconda()
  tensorflow::install_tensorflow()
  tensorflow::tf$constant("Hellow Tensorflow")
  shell: C:\R\bin\Rscript.EXE {0}
  env:
    GITHUB_PAT: ***
    R_KEEP_PKG_SOURCE: yes
    _R_INSTALL_TIME_PATCHES_: no
    R_LIBS_USER: D:\a\_temp\Library
    TZ: UTC
    _R_CHECK_SYSTEM_CLOCK_: FALSE
    NOT_CRAN: true
    RSPM: https://packagemanager.posit.co/cran/latest
    RENV_CONFIG_REPOS_OVERRIDE: https://packagemanager.posit.co/cran/latest
    R_LIBS_SITE: C:/R/site-library
    R_LIB_FOR_PAK: C:/R/site-library
* Downloading "https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe" ...
trying URL 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe'
Content type 'application/octet-stream' length 76708568 bytes (73.2 MB)
==================================================
downloaded 73.2 MB

* Installing Miniconda -- please wait a moment ...
Error: Error: miniconda installation failed [exit code 2]
Execution halted
Error: Process completed with exit code 1.
@t-kalinowski
Copy link
Member

Thanks for reporting, I'll investigate on Monday.

If you need a quick fix, a bare install_tensorflow() call should just work now, the underlying routines will find a suitable python in the runner tool cache automatically, and create a virtualenv with it that the R package will automatically find.

@AshesITR
Copy link
Author

Thanks for the swift reply. I can live without testing on Windows R 3.6 for the moment.

t-kalinowski added a commit to t-kalinowski/gh-actions-playground that referenced this issue Aug 28, 2023
@t-kalinowski
Copy link
Member

I'm having some difficulty reproducing this locally - this error seems to be confined to some interaction between GHA and the older version of R.

Sidenote - with the most recent pair of TF and reticulate releases, conda as an installation method is now opt-in. A bare call like install_tensorflow() will create a virtual environment.

Removing the install_miniconda() call (or wrapping it in a try()) should allow the rest of the action steps to finish successfully.

@t-kalinowski t-kalinowski added reprex Can't reproduce Windows labels Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reprex Can't reproduce Windows
Projects
None yet
Development

No branches or pull requests

2 participants