sh-3.2# /usr/local/bin/python3.5
Python 3.5.1 (default, Apr 18 2016, 11:55:04)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> import numpy as np
>>> img = cv2.imread('test2.jpg',0)
>>> cv2.line(img,(0,0),(50,50),(255,0,0),5)
array([[255, 255, 255, ..., 255, 255, 255],
[255, 255, 255, ..., 255, 255, 255],
[255, 255, 255, ..., 255, 255, 255],
...,
[ 40, 42, 45, ..., 22, 25, 26],
[ 56, 57, 58, ..., 15, 16, 18],
[ 64, 65, 65, ..., 16, 14, 15]], dtype=uint8)
>>> cv2.imshow("image",img)
>>> cv2.waitKey(0)
v2.destroyAllWindows()
27
>>> v2.destroyAllWindows()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'v2' is not defined
>>> cv2.destroyAllWindows()
>>>

matplotlibを動かしたいが、エラーが出る。
/usr/local/Cellar/にインストールされているが、それを呼び出せない。
sh-3.2# /usr/local/bin/python3.5
Python 3.5.1 (default, Apr 18 2016, 11:55:04)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> import numpy as np
>>> from matplotlib import pyplot as plt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'matplotlib'