Last active
September 21, 2016 03:25
-
-
Save reinhrst/4452e4594c026a077533 to your computer and use it in GitHub Desktop.
Install opencv master (2015-04-02) on python 3 on OSX
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
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__)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any reason not to use:
https://github.com/Homebrew/homebrew-science/blob/master/opencv3.rb