Created
August 15, 2022 13:06
-
-
Save WarFox/2e21ba9aac781c89a86986dac363b6d1 to your computer and use it in GitHub Desktop.
Installing lapack and openblas for building scipy on MacOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/env bash | |
brew install openblas | |
brew install lapack | |
# Set the following environment variables so that the build tools can find the libraries. | |
# openblas | |
export LDFLAGS="-L/usr/local/opt/openblas/lib $LDFLAGS" | |
export CPPFLAGS="-I/usr/local/opt/openblas/include $CPPFLAGS" | |
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig $PKG_CONFIG_PATH" | |
# lapack | |
export LDFLAGS="-L/usr/local/opt/lapack/lib $LDFLAGS" | |
export CPPFLAGS="-I/usr/local/opt/lapack/include $CPPFLAGS" | |
export PKG_CONFIG_PATH="/usr/local/opt/lapack/lib/pkgconfig $PKG_CONFIG_PATH" | |
## tell compiler not to error out for implicit function declarations | |
export CFLAGS=-Wno-error=implicit-function-declaration | |
export LAPACK=/usr/local/opt/lapack/lib/liblapack.dylib | |
export BLAS=/usr/local/opt/openblas/lib/libopenblas.dylib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment