Installing Caffe on OS X El Capitan

(Won’t be much content to this post – this is mostly for future reference.)

Step 0: Install brew and CUDA

ruby -e "$(curl -fsSL"
brew doctor
brew update

Download and install CUDA

echo "export PATH=/usr/local/cuda/bin:$PATH" >> ~/.profile
echo "export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH" >> ~/.profile

Step 1: Caffe dependencies

brew install python
brew install wget
brew install protobuf
brew install boost-python
brew install lmdb
brew install leveldb
brew install snappy
brew install gflags
brew install glog
brew tap homebrew/science
brew install opencv
brew install hdf5

Step 2: Caffe Python dependencies

pip install numpy
pip install scipy
pip install Cython
pip install scikit-image
pip install protobuf
pip install lmdb
pip install leveldb
pip install python-gflags
pip install h5py

Step 3: Build Caffe from source

git clone
cd caffe && wget
make -j8 && make pycaffe