-
-
Save seananderson/3c6cbf640ba566ce936c79442b9a6068 to your computer and use it in GitHub Desktop.
Link Homebrew OpenBLAS with R BLAS
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
| # Install Homebrew if needed: https://brew.sh/ | |
| # Install OpenBLAS with Homebrew: | |
| brew install openblas | |
| # Check the installed location of openblas: | |
| brew --prefix openblas | |
| # For me, that returns: | |
| # /opt/homebrew/opt/openblas | |
| # Now, we need to make a symlink from the openblas library file to the R BLAS library file. | |
| # First switch to the directory with the R BLAS library: | |
| cd /Library/Frameworks/R.framework/Resources/lib/ | |
| # Now symlink openblas to the R BLAS library file location: | |
| # If your openblas path was different from mine, replace it in this line: | |
| ln -s -i -v /opt/homebrew/opt/openblas/lib/libopenblas.dylib libRblas.dylib | |
| # When you restart R, it should now call libopenblas.dylib for math | |
| # To switch back | |
| cd /Library/Frameworks/R.framework/Resources/lib/ | |
| ln -s -i -v libRblas.0.dylib libRblas.dylib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment