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

ImportError with dynamic libraries #600

Open
1 task done
westonelison opened this issue Jun 11, 2024 · 1 comment
Open
1 task done

ImportError with dynamic libraries #600

westonelison opened this issue Jun 11, 2024 · 1 comment
Labels
bug Something isn't working linux

Comments

@westonelison
Copy link

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Today I installed a package in my environment mamba install -c conda-forge -c bioconda r-soupx, which worked fine. This upgraded openssl from 3.2 to 3.3. When running R from this environment one of the previous packages was unable to load with this error:

Error: package or namespace load failed for ‘hdf5r’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/welison/.conda/envs/mamba/envs/seurat5.0_decontx/lib/R/library/hdf5r/libs/hdf5r.so':
  /home/welison/.conda/envs/decontX_reticulate/lib/python3.10/lib-dynload/../../libcrypto.so.3: version `OPENSSL_3.3.0' not found (required by /home/welison/.conda/envs/mamba/envs/seurat5.0_decontx/lib/././libssl.so.3)

I poked around looking at that libssl library (libssl help from my working directory which worked, then moved to the directory containing the library and it failed, openssl: error while loading shared libraries: libssl.so.3: cannot dynamic). After this I decided to go back one revision on this environment. conda list --revisions gave:

Traceback (most recent call last):
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/common/serialize.py", line 12, in <module>
    import ruamel.yaml as yaml
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/ruamel/yaml/__init__.py", line 56, in <module>
    from ruamel.yaml.main import *  # NOQA
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/ruamel/yaml/main.py", line 17, in <module>
    from ruamel.yaml.loader import BaseLoader, SafeLoader, Loader, RoundTripLoader  # NOQA
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/ruamel/yaml/loader.py", line 7, in <module>
    from ruamel.yaml.constructor import (
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/ruamel/yaml/constructor.py", line 4, in <module>
    import base64
  File "/home/welison/.conda/envs/mamba/lib/python3.11/base64.py", line 11, in <module>
    import binascii
ImportError: libz.so.1: cannot dynamically load position-independent executable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/common/serialize.py", line 15, in <module>
    import ruamel_yaml as yaml
ModuleNotFoundError: No module named 'ruamel_yaml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/exception_handler.py", line 17, in __call__
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/cli/main.py", line 36, in main_subshell
    from ..base.context import context
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/base/context.py", line 35, in <module>
    from ..common.configuration import (
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/common/configuration.py", line 50, in <module>
    from .serialize import yaml_round_trip_load
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/common/serialize.py", line 17, in <module>
    raise ImportError(
ImportError: No yaml library available. To proceed, conda install ruamel.yaml

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/welison/.conda/envs/mamba/bin/conda", line 13, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/cli/main.py", line 109, in main
    return conda_exception_handler(main, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/exception_handler.py", line 389, in conda_exception_handler
    return_value = exception_handler(func, *args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/exception_handler.py", line 20, in __call__
    return self.handle_exception(exc_val, exc_tb)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/exception_handler.py", line 52, in handle_exception
    from .exceptions import (
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/conda/exceptions.py", line 15, in <module>
    import requests
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/urllib3/__init__.py", line 13, in <module>
    from . import exceptions
  File "/home/welison/.conda/envs/mamba/lib/python3.11/site-packages/urllib3/exceptions.py", line 7, in <module>
    from http.client import IncompleteRead as httplib_IncompleteRead
  File "/home/welison/.conda/envs/mamba/lib/python3.11/http/client.py", line 71, in <module>
    import email.parser
  File "/home/welison/.conda/envs/mamba/lib/python3.11/email/parser.py", line 12, in <module>
    from email.feedparser import FeedParser, BytesFeedParser
  File "/home/welison/.conda/envs/mamba/lib/python3.11/email/feedparser.py", line 27, in <module>
    from email._policybase import compat32
  File "/home/welison/.conda/envs/mamba/lib/python3.11/email/_policybase.py", line 7, in <module>
    from email import header
  File "/home/welison/.conda/envs/mamba/lib/python3.11/email/header.py", line 14, in <module>
    import binascii
ImportError: libz.so.1: cannot dynamically load position-independent executable

Now any conda or mamba command gives a similar error (activate, deactivate, init, search, clean). A few other users of this server have had similar issues and had to completely uninstall and reinstall mamba, but with only partial success. My googling hasn't been very helpful, but I will keep looking from my end.

Oh, and potentially relevant: There is a global anaconda3 install, which I used a few years back but removed from my paths and bashrc and now I only reference miniforge. That global anaconda3 is still there and referenced by other users.

Installed packages

Can't run

Environment info

Can't run
@westonelison westonelison added the bug Something isn't working label Jun 11, 2024
@hmaarrfk hmaarrfk added the linux label Jun 11, 2024
@jaimergp
Copy link
Member

This type of path (/home/welison/.conda/envs/mamba/envs/seurat5.0_decontx/lib/././libssl.so.3) suggests you have installed mamba inside Miniforge, as a new environment which has been marked as base, and now you have more environmetns there (see the two envs/ components).

Double check how your ~/.bashrc looks like because you might have a few initialization blocks there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux
Development

No branches or pull requests

3 participants