Created
November 1, 2016 20:20
-
-
Save smichalowski/65674ba799d38c0b29da107cbd801879 to your computer and use it in GitHub Desktop.
opencv3 + macOS Sierra + python2.7 + macports
This file contains hidden or 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
| download opencv source code, cd into source dir. | |
| ``` | |
| mkdir build | |
| cd build | |
| cmake .. -DBUILD_opencv_videoio=OFF -DPYTHON_LIBRARY=/opt/local/lib/libpython2.7.dylib -DPYTHON2_PACKAGES_PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages -DPYTHON2_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -DCMAKE_INSTALL_PREFIX=/opt/local | |
| make -j10 | |
| sudo make install | |
| ``` | |
| test your python | |
| ``` | |
| $ python | |
| Python 2.7.12 (default, Sep 22 2016, 23:57:29) | |
| [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> import cv2 | |
| >>> | |
| ``` | |
| great ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment