Skip to content

Instantly share code, notes, and snippets.

@jacyzon
Created October 6, 2015 05:13
Show Gist options
  • Select an option

  • Save jacyzon/bb9741dbfdbe3ae1cf3a to your computer and use it in GitHub Desktop.

Select an option

Save jacyzon/bb9741dbfdbe3ae1cf3a to your computer and use it in GitHub Desktop.
mac opencv setup
# 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