pip3 install h5py
Requirement already satisfied: numpy>=1.19.3 in /Users/.../.pyenv/versions/3.9.1/lib/python3.9/site-packages (from h5py) (1.20.0)
Building wheels for collected packages: h5py
Building wheel for h5py (PEP 517) ... error
Loading library to get build settings and version: libhdf5.dylib
error: Unable to load dependency HDF5, make sure HDF5 is installed properly
error: dlopen(libhdf5.dylib, 6): image not found
----------------------------------------
ERROR: Failed building wheel for h5py
命令行输入:
brew install hdf5
export HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.12.0_4(这里版本注意替换如1.12.1)
pip install --no-binary=h5py h5py