This article describes how to install OpenCV 3 and its Python 3 bindings on macOS and Ubuntu.
## `pyenv` users beware
Make sure to use system python because there is some tricky problem with OpenCV 3 install script.
To switch to system python, run `pyenv global system`.
# macOS
Install OpenCV 3 package from `homebrew/science`, make sure to add `--with-python3` so we'll also get its Python 3 bindings simultaneously.
```bash
brew tap homebrew/science
brew install opencv3 --with-python3
```
After installing OpenCV 3, put OpenCV 3 path file as `opencv3.pth` into brewed-`python3` site-packages directory, which indicates where the OpenCV 3 bindings installed.