Skip to content

Instantly share code, notes, and snippets.

@reinhrst
Last active September 21, 2016 03:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reinhrst/4452e4594c026a077533 to your computer and use it in GitHub Desktop.
Save reinhrst/4452e4594c026a077533 to your computer and use it in GitHub Desktop.
Install opencv master (2015-04-02) on python 3 on OSX
brew install python3
pip3 install numpy
brew install cmake
git clone --depth=1 https://github.com/Itseez/opencv.git
cd opencv
mkdir build
cd build
# note: in the next line, adjust paths to point to the correct python version
cmake -DBUILD_opencv_python3=YES -DBUILD_opencv_python2=NO -DINSTALL_PYTHON_EXAMPLES=YES -DPYTHON3_EXECUTABLE=/usr/local/bin/python3 -DPYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/include/python3.4m -DPYTHON3_LIBRARY=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib -DPYTHON3_NUMPY_INCLUDE_DIRS=/usr/local/lib/python3.4/site-packages/numpy/core/include/ -DPYTHON3_PACKAGES_PATH=/usr/local/lib/python3.4/site-packages/ ..
make -j8
make install
python3 -c "import cv2; print(cv2.__version__)"
@mafrosis
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment