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

Conda setup failing on creation in github CI workflow #292

Open
jhdark opened this issue Oct 11, 2023 · 5 comments
Open

Conda setup failing on creation in github CI workflow #292

jhdark opened this issue Oct 11, 2023 · 5 comments

Comments

@jhdark
Copy link

jhdark commented Oct 11, 2023

Hi all, I can't seem to have conda working reliably in a github ci workflow, I assume it has something to do with using mamba too? I do need this to install a package later down the line. But, the initialisation seems to fail occasionally. Heres the .yml file I use and the error produced

on: [pull_request, push]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - name: Set up Conda
      uses: conda-incubator/setup-miniconda@v2
      with:
        activate-environment: myenv
        mamba-version: "*"
        channels: conda-forge, defaults

Error:

  /usr/share/miniconda/condabin/mamba create --name myenv
  Warning: Traceback (most recent call last):
    File "/usr/share/miniconda/condabin/mamba", line 7, in <module>
  
  Traceback (most recent call last):
    File "/usr/share/miniconda/condabin/mamba", line 7, in <module>
  Warning:     from mamba.mamba import main
    File "/usr/share/miniconda/lib/python3.11/site-packages/mamba/mamba.py", line 49, in <module>
      import libmambapy as api
    File "/usr/share/miniconda/lib/python3.11/site-packages/libmambapy/__init__.py", line 7, in <module>
      raise e
    File "/usr/share/miniconda/lib/python3.11/site-packages/libmambapy/__init__.py", line 4, in <module>
      from libmambapy.bindings import *  # noqa: F401,F403
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ImportError: /usr/share/miniconda/lib/python3.11/site-packages/libmambapy/../../../libmamba.so.2: undefined symbol: solver_ruleinfo2str, version SOLV_1.0
  
      from mamba.mamba import main
    File "/usr/share/miniconda/lib/python3.11/site-packages/mamba/mamba.py", line 49, in <module>
      import libmambapy as api
    File "/usr/share/miniconda/lib/python3.11/site-packages/libmambapy/__init__.py", line 7, in <module>
      raise e
    File "/usr/share/miniconda/lib/python3.11/site-packages/libmambapy/__init__.py", line 4, in <module>
      from libmambapy.bindings import *  # noqa: F401,F403
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ImportError: /usr/share/miniconda/lib/python3.11/site-packages/libmambapy/../../../libmamba.so.2: undefined symbol: solver_ruleinfo2str, version SOLV_1.0

Error: The process '/usr/share/miniconda/condabin/mamba' failed with exit code 1```
@RemDelaporteMathurin
Copy link

The complete action run is available here

@tobiasdiez
Copy link

tobiasdiez commented Oct 18, 2023

As a workaround, you can use mamba from miniforge by replacing mamba-version: '*' with

          miniforge-version: latest
          use-mamba: true
          channels: conda-forge

@jhdark
Copy link
Author

jhdark commented Oct 18, 2023

This seems to work great thanks @tobiasdiez !

vbraun pushed a commit to vbraun/sage that referenced this issue Oct 19, 2023
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

Mamba currently has problems with dependencies installed from other
channels (libarchive/libarchive#1857,
conda-incubator/setup-miniconda#292,
conda-forge/libarchive-feedstock#69), see eg h
ttps://github.com/sagemath/sage/actions/runs/6525067702/job/17717363515.

As workaround we use miniforge now (which comes with a preinstalled
mamba from conda-forge)

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [ ] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36468
Reported by: Tobias Diez
Reviewer(s): Isuru Fernando, Matthias Köppe
phelps-sg added a commit to phelps-sg/llm-cooperation that referenced this issue Oct 20, 2023
@dlcaballero16
Copy link

dlcaballero16 commented Oct 24, 2023

So I am having a similar issue where I have an undefined symbol. According to Mamba documentation, it does not like having the defaults channel included. When looking at the action on github, the defaults channel still gets added in the Applying Initial Configuration step, though not sure why. Hope this info helps.

Edit: I have not tried using the workaround above yet

@goanpeca
Copy link
Member

Indeed, it seems the defaults channel might be still leaking. Will take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants