在brew update & 之后HDF5出现问题升级
我是 M1 用户,到目前为止正在使用 python 3.9.10 进行编码。
我尝试更新lib.与自制程序,特别是对于 python 3.9.12 和 HDF5。我还重新安装了h5py。这里我尝试过。
brew update & upgrade
brew reinstall hdf5
export HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.13.0/
pip install h5py --upgrade --no-dependencies --force
全部升级完成。然而我在尝试代码时遇到了这样的错误信息,根据之前的构建环境没有错误。
> import h5py
> File "/opt/homebrew/lib/python3.9/site-packages/h5py/__init__.py", line 25, in <module>
> from . import _errors
> ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/h5py/_errors.cpython-39- darwin.so, 0x0002): Library not loaded: /opt/homebrew/opt/hdf5/lib/libhdf5.300.dylib
> Referenced from: /opt/homebrew/lib/python3.9/site-packages/h5py/_errors.cpython-39-darwin.so
> Reason: tried: '/opt/homebrew/opt/hdf5/lib/libhdf5.300.dylib' (no such file), '/usr/local/lib/libhdf5.300.dylib' (no such file), '/usr/lib/libhdf5.300.dylib' (no such file), '/opt/homebrew/Cellar/hdf5/1.12.1_1/lib/libhdf5.300.dylib' (no such file), '/usr/local/lib/libhdf5.300.dylib' (no such file), '/usr/lib/libhdf5.300.dylib' (no such file)
如上所示,在brew升级
之后,hdf5_dir被修复在1.12.1_1上,即使我已经安装了1.13.0,直到尝试brew升级
时才出现问题。 如果有人知道问题的原因以及如何解决,请帮助我。
提前致谢。
I'm M1 user and coding on python 3.9.10 up to now.
I try updating lib. with homebrew, especially for python 3.9.12 and HDF5. Also I reinstalled h5py. Here I tried.
brew update & upgrade
brew reinstall hdf5
export HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.13.0/
pip install h5py --upgrade --no-dependencies --force
All upgrade was done. However, I met such an error message when I tried codes, which has no error based on previous build environments.
> import h5py
> File "/opt/homebrew/lib/python3.9/site-packages/h5py/__init__.py", line 25, in <module>
> from . import _errors
> ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/h5py/_errors.cpython-39- darwin.so, 0x0002): Library not loaded: /opt/homebrew/opt/hdf5/lib/libhdf5.300.dylib
> Referenced from: /opt/homebrew/lib/python3.9/site-packages/h5py/_errors.cpython-39-darwin.so
> Reason: tried: '/opt/homebrew/opt/hdf5/lib/libhdf5.300.dylib' (no such file), '/usr/local/lib/libhdf5.300.dylib' (no such file), '/usr/lib/libhdf5.300.dylib' (no such file), '/opt/homebrew/Cellar/hdf5/1.12.1_1/lib/libhdf5.300.dylib' (no such file), '/usr/local/lib/libhdf5.300.dylib' (no such file), '/usr/lib/libhdf5.300.dylib' (no such file)
As shown above, hdf5_dir is fixed on 1.12.1_1 after brew upgrade
, even I already installed 1.13.0 which didn't make a problem until trying brew upgrade
.
Please, help me if anyone know what makes the problem and how to solve it.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下对我有用。首先,卸载
H5PY
和HDF5
(还删除了我的pip
缓存,但不确定这有多相关)。然后跑The following worked for me. First, uninstall
h5py
andhdf5
(also deleted mypip
cache, but not sure how relevant this is). Then just run对我来说,酿造安装无效。以下有效:
for me, brew install did not work. the following worked: