macOS - pip install scipy Error:
numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries
found. Note: Accelerate is no longer supported.
- 查出mac系统的版本标识:
$ pip install packaging
$ python -c"from packaging import tags; print('\n'.join([str(t) for t in tags.sys_tags()]))" |head -5
cp38-cp38-macosx_11_0_arm64
cp38-cp38-macosx_11_0_universal2
cp38-cp38-macosx_10_16_universal2
cp38-cp38-macosx_10_15_universal2
cp38-cp38-macosx_10_14_universal2
-
在Pypi scipy官网下载 10_9 wheel 版本:
https://pypi.org/project/scipy/#files -
重命名下载的wheel版本文件成自己的查出mac系统的版本标识:
$ mv scipy-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl scipy-1.8.0-cp38-cp38-macosx_11_0_arm64.whl -
使用wheel安装 scipy :
$ pip install scipy-1.8.0-cp38-cp38-macosx_11_0_arm64.whl
我这边完美解决了
还有的方案是(我这边配置完没有用,o(╯□╰)o):
brew install openblas
export LDFLAGS="-L/opt/homebrew/opt/openblas/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openblas/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openblas/lib/pkgconfig"
export OPENBLAS="$(brew --prefix openblas)"
pip3 install scipy