install caffe on mac el capitan

Note for my installation

tip #1: no need to do this

brew install openblas

because veclib is an alternative built-in in mac already.
for error: cblas.h not found: we have to point out where is veclib headers are

cmake -DCMAKE_CXX_FLAGS=-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/ -DCPU_ONLY=1 ..

for error vecLib not found, open CMakeCache.txt, find the place  to change line to this

vecLib_INCLUDE_DIR:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/

Update 24/05/2017

If you get this error

Error: Segmentation fault: 11 in Caffe (PyCaffe)

Error: Segmentation fault: 11

check again the cmake outputs, make sure python interpret and python dylib is from a same python distribution (i.e, homebrew or anaconda, miniconda)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s