天天看点

mac os, python 3.7 安装opencv3

感想

programmer在做事情的时候,最厌烦的就是安装这个安装那个了,我也是,然后我发现安装opencv到python3也不是很容易,我这里分享一下我的简洁方法。

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"      
$ brew update      

opencv for python3 安装

brew tap homebrew/science
$ brew install opencv3 --with-contrib --with-python3 --HEAD      
➜  ~ python3
Python 3.7.0 (default, Oct  2 2018, 09:20:07)
[Clang 10.0.0 (clang-1000.11.45.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>>      

参考文献