Skip to content

在 Mac OS X 上安装 Opencv3 (Python3.5) #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nodejh opened this issue Nov 22, 2016 · 0 comments
Open

在 Mac OS X 上安装 Opencv3 (Python3.5) #20

nodejh opened this issue Nov 22, 2016 · 0 comments
Labels

Comments

@nodejh
Copy link
Owner

nodejh commented Nov 22, 2016

通过 homebrew 安装 opencv

通过 homebrew 安装在 Mac OS X 上安装为 Python3.5 安装 Opencv3:

$ brew install opencv3 --with-python3
......
......
This formula is keg-only, which means it was not symlinked into /usr/local.

opencv3 and opencv install many of the same files.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/opencv3/lib
    CPPFLAGS: -I/usr/local/opt/opencv3/include

==> Summary

安装完成后,会有如上提示。接下来需要做的事,将 opencv3site-packegs 链接到 Python3site-packegs:

echo /usr/local/opt/opencv3/lib/python3.5/site-packages >> /usr/local/lib/python3.5/site-packages/opencv3.pth

检查是否安装成功

$ python
>>> import cv2
>>> cv2.__version__
'3.1.0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant