--- Makefile.config.orig 2017-08-24 10:43:43.000000000 +0900
+++ Makefile.config 2017-08-24 10:43:54.000000000 +0900
# Uncomment if you're using OpenCV 3
# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# NOTE: this is required only if you will compile the python interface.
# We need to be able to find Python.h and numpy/arrayobject.h.
-PYTHON_INCLUDE := /usr/include/python2.7 \
- /usr/lib/python2.7/dist-packages/numpy/core/include
+_PYTHON_ROOT := $(_PREFIX)/Library/Frameworks/Python.framework/Versions/2.7
+PYTHON_INCLUDE := $(_PYTHON_ROOT)/include/python2.7 \
+ $(_PYTHON_ROOT)/lib/python2.7/site-packages/numpy/core/include
# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
# ANACONDA_HOME := $(HOME)/anaconda
# /usr/lib/python3.5/dist-packages/numpy/core/include
# We need to be able to find libpythonX.X.so or .dylib.
+PYTHON_LIB := $(_PREFIX)/lib
# PYTHON_LIB := $(ANACONDA_HOME)/lib
# Homebrew installs numpy in a non standard path (keg only)
# Whatever else you find you need goes here.
-INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
-LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
+INCLUDE_DIRS := $(PYTHON_INCLUDE) $(_PREFIX)/include /usr/include
+LIBRARY_DIRS := $(PYTHON_LIB) /usr/lib
# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
# INCLUDE_DIRS += $(shell brew --prefix)/include