Skip to content

Instantly share code, notes, and snippets.

@jpgehrig
Last active May 11, 2019 12:44
Show Gist options
  • Save jpgehrig/0d145b9340aaf99a8cf1bf37351338de to your computer and use it in GitHub Desktop.
Save jpgehrig/0d145b9340aaf99a8cf1bf37351338de to your computer and use it in GitHub Desktop.
Install Caffe on OS X 10.11 with Python 3
#!/bin/bash
git clone [email protected]:BVLC/caffe.git
cd caffe
brew install -vd snappy leveldb gflags glog szip lmdb
brew install --build-from-source --with-python3 -vd protobuf
brew install --build-from-source --with-python3 -vd boost159 boost-python159
curl https://gist.githubusercontent.com/jpgehrig/92e38396f855cd1f1c911a0da07f8aef/raw/ > Makefile.config
for req in $(cat caffe/python/requirements.txt); do pip install $req; done
make all -j4
make pycaffe
cp -r distribute/python/caffe ~/Library/Python/3.5/lib/python/site-packages/
cp distribute/lib/libcaffe.so.1.0.0-rc3 ~/Library/Python/3.5/lib/python/site-packages/caffe/libcaffe.so.1.0.0-rc3
install_name_tool -change @rpath/libcaffe.so.1.0.0-rc3 ~/Library/Python/3.5/lib/python/site-packages/caffe/libcaffe.so.1.0.0-rc3 ~/Library/Python/3.5/lib/python/site-packages/caffe/_caffe.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment