Installing OpenCV 3.1 on OS X El Capitan using Python 3.5.1 -


i have looked proper way install opencv, can find people fudging around python 2.old or virtualenv or other things utterly irrelevant. want able run import cv2 without import errors.

how install opencv on os x 10.11 use python 3.5.1?

we can install opencv3 python3(python3.5) mac os x homebrew.

first, install homebrew:

ruby -e "$(curl -fssl https://raw.githubusercontent.com/homebrew/install/master/install)"

you can see details how install homebrew. http://brew.sh

if don't install python3, install python3:

brew install python3

then install opencv3 python3:

brew install opencv3 --with-python3

finally, maybe link site-packages of opencv3 site-packages of python3:

in follow command, /usr/local/opt/opencv3/lib/python3.5/site-packages directory of opencv3's site-packages, /usr/local/lib/python3.5/site-packages/ directory of python3.5's site-packages. maybe should change 2 own directories.

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


Comments