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

Known issues #283

Open
jaimergp opened this issue Sep 19, 2023 · 5 comments
Open

Known issues #283

jaimergp opened this issue Sep 19, 2023 · 5 comments
Labels
documentation::explanation related to higher-level clarification (understanding-oriented) severity::4 low; functionality is inconvenient source::contributor created by a frequent contributor

Comments

@jaimergp
Copy link
Contributor

jaimergp commented Sep 19, 2023

The following items are known and either awaiting a bugfix elsewhere or, if no fix available, a workaround is suggested.

libarchive: "library not loaded" or "cannot open shared object file"

Observed errors

On Linux:

ImportError: libarchive.so.13: cannot open shared object file: No such file or directory

On macOS:

ImportError: dlopen(~/miniconda3/lib/python3.11/site-packages/libmambapy/bindings.cpython-311-darwin.so, 2): Library not loaded: @rpath/libarchive.13.dylib Referenced from: ~/miniconda3/lib/libmamba.2.0.0.dylib Reason: image not found

Explanation

This is a known incompatibility between the libarchive packages published on defaults and conda-forge. The root cause is a problem in the CMake build configuration upstream (libarchive/libarchive#1857).

Solution

This is a packaging problem that will be eventually solved, but that won't happen until libarchive 3.8 is published (or later). For now, the recommendation is to make sure that libarchive and libmamba come from the same channel.

References


Cannot use defaults::package specs

Observed errors

RuntimeError: The package "pkgs/main::zlib" is not available for the specified platform
InvalidMatchSpec: Invalid spec 'pkgs/main::python': This is a bug in libmamba 1.5.1 when using 'defaults::<spec>' or 'pkgs/main::<spec>'. Consider using '-c defaults' instead.

Explanation

This is a known issue reported in libmamba: mamba-org/mamba#2431

Solution

Fixed in libmamba 1.5.3. Please update to the latest version.


Cannot Ctrl-C out of conda

Observed errors

Users are unable to use Ctrl+C to exit conda commands when libmamba is in use.

Explanation

The libmamba C++ library has some custom signal handlers that take over the signal controllers in Python's thread. Instantiating the libmambapy.Context object is enough to install those handlers in the process. This prevents Python from handling SIGINT correctly.

Solution

Fixed in libmamba 1.5.3. A small change is needed in conda-libmamba-solver, and will be made available soon.

In the meantime, users can use a different signal to kill the process. For example, Ctrl+Z to pause it and then issue SIGKILL / 9 via top or htop.

@spyoungtech
Copy link

For now, the recommendation is to make sure that libarchive and libmamba come from the same channel.

To expand on this, libarchive seems to come with conda by default (when installed via miniconda). So, even if you're working with a clean conda install and using conda-forge as your only configured channel, you'll get this error until you reinstall libarchive.

I suspect miniforge users won't have this issue.

psavery added a commit to HEXRD/hexrd that referenced this issue Oct 18, 2023
See: conda/conda-libmamba-solver#283

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@jezdez jezdez added source::contributor created by a frequent contributor severity::4 low; functionality is inconvenient documentation::explanation related to higher-level clarification (understanding-oriented) labels Nov 2, 2023
@gosunny2050
Copy link

how to solve it

@noahlibby17
Copy link

Any update on how to solve this issue?

@spyoungtech
Copy link

spyoungtech commented Feb 17, 2024

@gosunny2050 @noahlibby17

As noted above:

For now, the recommendation is to make sure that libarchive and libmamba come from the same channel.

I'll try to elaborate on this to the best of my ability...

If you run conda list, it will show your installed packages, the version/build, and the channel source. So, if you find the entries for libarchive and libmamba in the output of conda list: BOTH of them should show the same channel (for example, conda-forge). If you see they are installed from different channels, you must uninstall/reinstall one or both of the packages so that they are installed from the same channel.

In my case, I was running into this issue even with a fresh conda base environment (via miniconda) because, by default, libarchive is present and installed from the defaults channel. So, when I installed libmamba from conda-forge, this issue occurred due to the mismatching channels.

To fix this, when I create my environment, I make sure to remove the defaults channel then run conda update --all which will cause all packages to be from conda-forge (assuming you have no other channels configured):

# make sure conda-forge is the only channel
conda config --remove channels defaults
conda config --add channels conda-forge

# update all packages to make sure they're from conda-forge, not defaults
conda update --all

After updating with the new channel configuration, when you run conda list again, you should see they are using the same channel:

$ conda list
# packages in environment at /opt/miniconda:
#
# Name                    Version                   Build  Channel
[...]
libarchive                3.7.2                h2aa1ff5_1    conda-forge
[...]
libmamba                  1.5.6                had39da4_0    conda-forge

@gregorywaynepower
Copy link

gregorywaynepower commented Apr 22, 2024

I was able to resolve this issue by running conda install libarchive within my base environment and giving the defaults channel priority in my .condarc file. Where it replaced the condaforge version with the pkgs/main version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation::explanation related to higher-level clarification (understanding-oriented) severity::4 low; functionality is inconvenient source::contributor created by a frequent contributor
Projects
Status: 🆕 New
Development

No branches or pull requests

6 participants