こんにちは。
OSX 10.11 で Cuda 付きで OpenCV (3.2) をインストールしました。必要な Xcode721 1はダウンロードして入手しました。
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.6
BuildVersion: 15G1421
$ sudo xcode-select --switch /Applications/Xcode721.app/Contents/Developer/
$ xcodebuild -version
Xcode 7.2.1
Build version 7C1002
$ xcode-select -print-path
/Applications/Xcode721.app/Contents/Developer
$ export SDKROOT=/Applications/Xcode721.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
$ brew install python python3
$ python --version
Python 2.7.13
$ python3 --version
Python 3.6.1
$ brew tap caskroom/cask homebrew/science
$ brew cask install cuda
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:46_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
$ brew install opencv3 --with-cuda --with-python3
$ python -c "import cv2; print cv2.__version__"
3.2.0
-
"System Requirements" (NVIDIA CUDA Installation Guide for Mac OS X)の説明を参考 ↩