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: libblosc2.so.2: cannot open shared object file: No such file or directory #601

Closed
anmyachev opened this issue Apr 10, 2024 · 1 comment

Comments

@anmyachev
Copy link

import pytables works when c-blosc2==2.14.1, but not when c-blosc2==2.14.4 (both installed from conda-forge)

Traceback:

        try:
>           module = importlib.import_module(name)

/usr/share/miniconda3/envs/modin/lib/python3.9/site-packages/pandas/compat/_optional.py:135: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/share/miniconda3/envs/modin/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    """PyTables, hierarchical datasets in Python.
    
    :URL: http://www.pytables.org/
    
    PyTables is a package for managing hierarchical datasets and designed
    to efficiently cope with extremely large amounts of data.
    
    """
    import os
    from ctypes import cdll
    from ctypes.util import find_library
    import platform
    
    
    # Load the blosc2 library, and if not found in standard locations,
    # try this directory (it should be automatically copied in setup.py).
    current_dir = os.path.dirname(__file__)
    platform_system = platform.system()
    blosc2_lib_hardcoded = "libblosc2"
    if platform_system == "Linux":
        blosc2_lib_hardcoded += ".so"
    elif platform_system == "Darwin":
        blosc2_lib_hardcoded += ".dylib"
    else:
        blosc2_lib_hardcoded += ".dll"
    blosc2_found = False
    blosc2_search_paths = [blosc2_lib_hardcoded,
                           os.path.join(current_dir, blosc2_lib_hardcoded),
                           find_library("blosc2")]
    for blosc2_lib in blosc2_search_paths:
        if blosc2_lib:
            try:
                cdll.LoadLibrary(blosc2_lib)
            except OSError:
                pass
            else:
                blosc2_found = True
                break
    if not blosc2_found:
        raise RuntimeError("Blosc2 library not found. "
                           f"I looked for \"{', '.join(blosc2_search_paths)}\"")
    
    # Necessary imports to get versions stored on the cython extension
>   from .utilsextension import get_hdf5_version as _get_hdf5_version
E   ImportError: libblosc2.so.2: cannot open shared object file: No such file or directory
@FrancescAlted
Copy link
Member

This is an issue with the conda-forge packaging, and is being addressed here: conda-forge/c-blosc2-feedstock#62 . Closing.

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