Sunday, December 6, 2015

fatal error: 'cblas.h' file not found

I once again found myself installing caffe on my Mac, and ran into that error. The solution was to install openblas via "brew install openblas", and then edit the relevant lines in Makefile.config to look like this:

BLAS := open
BLAS_INCLUDE := /usr/local/Cellar/openblas/0.2.14_1/include
BLAS_LIB := /usr/local/Cellar/openblas/0.2.14_1/lib

Also, I was getting some weird permission errors about inability to do the linking (when using brew install). I tried "sudo brew link openblas" and then got a confusing error about sudo. The solution was to execute the following lines:

sudo chown -R `whoami`:admin /usr/local/bin

sudo chown -R `whoami`:admin /usr/local/share

After that I was able to brew link as needed.

Contents of my Makefile.config, largely for my own reference (I think the only other things I modified were the python paths for anaconda:

No comments:

Post a Comment