Created
January 26, 2016 12:52
-
-
Save dnlcrl/1e5a4b343a6a71ed82aa to your computer and use it in GitHub Desktop.
fix incompatibility between tensorflow and caffe on OSX 10.11 el capitan, due to the different protobuf versions, installed by brew for caffe and by pip for tf
This file contains 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
# follow instructions on http://caffe.berkeleyvision.org/install_osx.html except for protobuf, where you should use --devel and not use --with-python because it is the default behaviour | |
brew install --devel protobuf #basically you are installing protobuf 3.0, the same checked by pip for tensorflow | |
# continue with caffe installation, after make all and before make runtest, set the right linking lib location | |
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 .build_release/test/test_all.testbin | |
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 .build_release/tools/caffe | |
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 .build_release/lib/libcaffe.so | |
# run make runtest, if everything is ok, before running make pycaffe set the right linking location for python | |
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 /Users/imac/caffe/python/caffe/_caffe.so | |
# make pycaffe; cd caffe/python; try to run python >>>import caffe, if it works you are on the run, add pycaffe to env for import caffe | |
PYTHONPATH=/path/to/caffe/python:$PYTHONPATH | |
# caffe is now working, to install tensorflow you simply need to pip install it | |
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl | |
# everything should just work now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment