Created
October 6, 2015 05:13
-
-
Save jacyzon/bb9741dbfdbe3ae1cf3a to your computer and use it in GitHub Desktop.
mac opencv setup
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
| # brew install opencv and python | |
| brew tap homebrew/science | |
| brew install opencv | |
| brew install python | |
| brew install python3 | |
| # setup bash_profile / zshrc to use homebrew python | |
| export PATH=/usr/local/bin:$PATH | |
| # virtualenv | |
| pip install virtualenv virtualenvwrapper | |
| # bash_profile / zshrc | |
| source /usr/local/bin/virtualenvwrapper.sh | |
| # new virtual env | |
| # to swith back: deactivate | |
| # switch between virtual env: workon virtual_env_name | |
| mkvirtualenv cv | |
| # numpy, ipython | |
| pip install numpy | |
| pip install ipython | |
| # link homebrew installed opencv site package to cv virtualenv | |
| ln -s /usr/local/Cellar/opencv/2.4.12/lib/python2.7/site-packages/cv2.so | |
| ln -s /usr/local/Cellar/opencv/2.4.12/lib/python2.7/site-packages/cv2.py | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment