Pages

Wednesday, July 27, 2016

Error: Segmentation fault: 11 in Caffe (PyCaffe)

Error: Segmentation fault: 11

If you get the above error during import caffe in Python, check if the following path in [Caffe installation directory]/ makefile.config points to system Python instead of Homebrew version of Python.

PYTHON_INCLUDE and PYTHON_LIB

PYTHON_INCLUDE := /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/include/python2.7

PYTHON_LIB := /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/

Then append Python directory in Caffe installation directory to PYTHONPATH as given below.

export PYTHONPATH=[Caffe installation directory]/python:$PYTHONPATH

No comments:

Post a Comment