10
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MacにOpenCV3をインストールする

Posted at

version

macOS sierra 10.12.3
Python 3.6.0
opencv3.2.0

参考

opencv3はpython3対応で、"import cv2"でインポートできる.
インストール参考
homebrewでopencv3を入れてpython3からOpenCVを使えるようにした。
Homebrew で OpenCV3 の Python バインディングを試す
Homebrewを使ってOpenCV3、Python2,3をMacにインストールする

OpenCV3のインストール

$ brew tap homebrew/science
$ brew install opencv3 --with-python3
#パスを通す
$ echo /usr/local/Cellar/opencv3/3.2.0/lib/python3.6/site-packages >> /usr/local/lib/python3.6/site-packages/opencv3.pth

このようにインストールできた.
[tama@ /usr/local/lib/python3.6]$ python3
Python 3.6.0 (default, Dec 24 2016, 08:01:42)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>>

10
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?