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

mamba not working on newer miniconda installations #21

Open
benoistlaurent opened this issue Aug 16, 2023 · 3 comments
Open

mamba not working on newer miniconda installations #21

benoistlaurent opened this issue Aug 16, 2023 · 3 comments

Comments

@benoistlaurent
Copy link

benoistlaurent commented Aug 16, 2023

Description

Miniconda's Mamba is looking for libarchive.13 while Miniconda installs a more recent version.

Error messages

No error on installation.
Errors occur upon running mamba.

On Ubuntu 22.04.3 LTS

$ mamba --help
Traceback (most recent call last):
  File "/opt/miniconda/bin/mamba", line 7, in <module>
    from mamba.mamba import main
  File "/opt/miniconda/lib/python3.11/site-packages/mamba/mamba.py", line 49, in <module>
    import libmambapy as api
  File "/opt/miniconda/lib/python3.11/site-packages/libmambapy/__init__.py", line 7, in <module>
    raise e
  File "/opt/miniconda/lib/python3.11/site-packages/libmambapy/__init__.py", line 4, in <module>
    from libmambapy.bindings import *  # noqa: F401,F403
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: libarchive.so.13: cannot open shared object file: No such file or directory

On Mac OS

❯❯  mamba --help
Traceback (most recent call last):
  File "/opt/miniconda/bin/mamba", line 7, in <module>
    from mamba.mamba import main
  File "/opt/miniconda/lib/python3.11/site-packages/mamba/mamba.py", line 49, in <module>
    import libmambapy as api
  File "/opt/miniconda/lib/python3.11/site-packages/libmambapy/__init__.py", line 7, in <module>
    raise e
  File "/opt/miniconda/lib/python3.11/site-packages/libmambapy/__init__.py", line 4, in <module>
    from libmambapy.bindings import *  # noqa: F401,F403
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: dlopen(/opt/miniconda/lib/python3.11/site-packages/libmambapy/bindings.cpython-311-darwin.so, 0x0002): Library not loaded: '@rpath/libarchive.13.dylib'
  Referenced from: '/opt/miniconda/lib/libmamba.2.0.0.dylib'
  Reason: tried: '/opt/miniconda/lib/libarchive.13.dylib' (no such file), '/opt/miniconda/lib/python3.11/site-packages/libmambapy/../../../libarchive.13.dylib' (no such file), '/opt/miniconda/lib/python3.11/site-packages/libmambapy/../../../libarchive.13.dylib' (no such file), '/opt/miniconda/bin/../lib/libarchive.13.dylib' (no such file), '/opt/miniconda/bin/../lib/libarchive.13.dylib' (no such file), '/usr/local/lib/libarchive.13.dylib' (no such file), '/usr/lib/libarchive.13.dylib' (no such file)

Proposed solution

As this is a Miniconda / Mamba problem, it is not mdws responsability to solve it per se.

A workaround would be to use a classic virtualenv (see requirements file attached).
environment-virtualenv.txt

@benoistlaurent
Copy link
Author

This bug as been reported in conda issues: conda/conda#13041

@benoistlaurent
Copy link
Author

As described in conda/conda#13041, the solution is to use conda + mamba solver.

# Set conda to use mamba for solving package dependancies
conda install -n base conda-libmamba-solver
conda config --set solver libmamba

# Create mdws environment
conda env create -f binder/environment.yml

The README should probably mention this.

@pierrepo
Copy link
Member

pierrepo commented Sep 5, 2023

Thanks @benoistlaurent this is probably the best solution.

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

2 participants