setup-miniconda: Creating conda environment fails with non-descriptive error message

When setting up miniconda I get the following last lines in the log:

Creating conda environment from yaml file...
  /usr/share/miniconda/condabin/conda env create --file environment.yml --name practical-omnitigs
  Collecting package metadata (repodata.json): ...working... done
  Solving environment: ...working... ::error::The process '/usr/share/miniconda/condabin/conda' failed with exit code null

This makes the job fail. I searched for error with the search function in the log, but got no other error message. Is there a way to get a more descriptive error message?

Here is the job that fails.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 22 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@kelly-sovacool I’m not associated with this repo, but since i read your comment…

you could try using mambaforge instead of conda+mamba… it solved all issues for me… (and it’s even faster) (like here: https://github.com/raphaelquast/EOmaps/commit/e7f4590e5f28054d345e8090146126a2dad1c63f)

I wonder if this is “just” a memory issue. The classic solver is known to hog a lot of resources trying to solve complex environments and/or explaining conflicts.

If macOS works but Linux doesn’t it could be either:

  • the packaging landscape being easier to traverse on macOS
  • having more memory available on those runners.

One thing to try is to export an environment variable (at the global level) to increase verbosity:

env:
 CONDA_VERBOSITY: 3

And see what’s going on.

The mamba solver is not only faster, but also way more efficient in terms of memory usage.

In terms of why it used to work but now it doesn’t… conda-forge keeps growing and repodata gets bigger and more complex. We might be at a point where linux-64 is “too big for GHA runners”. But this is just a guess and we need actual measurements of the memory usage. If anyone knows how to do that easily on GHA jobs, please let us know!

I’m getting this error when running the action on ubuntu-latest, but it works on macos-latest. I’d prefer to be able to use ubuntu because a later step in the job requires it.

In the actions yml:

- uses: conda-incubator/setup-miniconda@v2
  with:
    python-version: 3.11
    mamba-version: "*"
    channel-priority: true
    activate-environment: github-actions
    environment-file: workflow/envs/github-actions.yml

The conda env file (workflow/envs/github-actions.yml):

name: github-actions
channels:
  - conda-forge
  - bioconda
  - defaults
  - r
dependencies:
  - black=22.10.0
  - python=3.11.0
  - r-base=4.2.2
  - r-styler=1.8.1
  - r-usethis=2.1.6
  - snakefmt=0.8.0

hey, of course that’s possible! 🙂

I’ve used the following environment for testing: conda-yml for EOmaps

…and the tests on GitHub were running on “Ubuntu latest” (according to https://github.com/actions/virtual-environments this is currently 20.04)