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

Library not loaded: @rpath/libhdf5.310.dylib #1022

Open
windemut opened this issue Jun 16, 2023 · 5 comments
Open

Library not loaded: @rpath/libhdf5.310.dylib #1022

windemut opened this issue Jun 16, 2023 · 5 comments

Comments

@windemut
Copy link

windemut commented Jun 16, 2023

I can't get tables to work at all on Mac M1 Ventura 13.4. It can't find the hdf5 dynamic library, it seems. I installed like this:

brew install hdf5 c-blosc lzo bzip2
export HDF5_DIR="$(brew --prefix hdf5)"
pip3 install tables
% python3 -m tables.tests.test_all
Traceback (most recent call last):
  File "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 112, in _get_module_details
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tables/__init__.py", line 32, in <module>
    from .utilsextension import get_hdf5_version as _get_hdf5_version
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tables/utilsextension.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/libhdf5.310.dylib
  Referenced from: <97D08AE0-CC5C-35AA-AC56-C45460DE5186> /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tables/utilsextension.cpython-311-darwin.so
  Reason: tried: '/usr/lib/libhdf5.310.dylib' (no such file, not in dyld cache)

Any ideas?

@avalentino
Copy link
Member

Dear @windemut
It would be nice to understand that is $(brew --prefix hdf5) to have a better picture of what is happening.
Moreover, could you please clarify if you are using a native PyTables build or if you are working with x86 emulation?

As a general comment I can say that many users reported strange behaviours related with brew used on M1 HW. Maybe you could try to give a look to some of the old tickets (many of them already closed) to understand is a solution to your problem has been already found.
We try to label these issues with osx or osx-arm64. Maybe it will help you in the search.

@windemut
Copy link
Author

Thank you for your response, @avalentino! The hdf5 path expands to ‘/opt/homebrew/opt/hdf5’, and libhdf5.310.dylib is found in the ‘lib’ subdirectory thereof. I don’t know about emulation, I just used ‘pip3 install tables’. I will search some more, but I have already done a lot. The problem seems to be related with @rpath, and I have little understanding of that.

@avalentino
Copy link
Member

hmm, I don't think that the rpath link flag is used in the PyTables build process, but I could be wrong.
Unfortunately I do not have access to a Mac M1 to reproduce the issue.
Is it possible for you to attach the full build log of PyTables?

You could also try to set DYLD_LIBRARY_PATH to point to the installation path of HDF5.
I'm not sure that it will work if rpath is set, but this is something easy to try.

@avalentino
Copy link
Member

Dear @windemut , did you manage to solve the issue?

@windemut
Copy link
Author

No, I had to move on to other things. If I try again and get results I’ll come back here. Thanks for your help!

@avalentino avalentino modified the milestones: 3.9.0, 3.9.1, 3.9.2 Oct 6, 2023
@ivilata ivilata modified the milestones: 3.9.2, 3.9.3 Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@ivilata @avalentino @windemut and others