title: Installing opencv-3.1.0 on MacOS Sierra to use with python
body: <p>I recently upgraded to MacOS Sierra and I have been dealing with many issues (I am mentioning it cause it may be relevant). I am trying to install opencv-3.1.0 to use with python 2.7. and it's been impossible. I downloaded opencv-3.1.0 from <a href="https://github.com/Itseez/opencv/archive/3.1.0.zip" rel="nofollow">here</a> unzipped it and ran:</p>
  
  <pre><code>python platforms/osx/build_framework.py osx
  </code></pre>
  
  <p>from the opencv-3.1.0 directory. Don't want to print all of the output, so here is just the Error message. </p>
  
  <pre><code>** BUILD FAILED **
  
  
  The following build commands failed:
      CompileC osx/build/x86_64-MacOSX/modules/world/OpenCV.build/Release/opencv_world.build/Objects-normal/x86_64/cap_qtkit.o modules/videoio/src/cap_qtkit.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
  (1 failure)
  ============================================================
  ERROR: Command '['xcodebuild', 'ARCHS=x86_64', '-sdk', 'macosx', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '4', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65
  ============================================================
  Traceback (most recent call last):
    File "/Users/christoshadjinikolis/Downloads/opencv-3.1.0/platforms/ios/build_framework.py", line 87, in build
      self._build(outdir)
    File "/Users/christoshadjinikolis/Downloads/opencv-3.1.0/platforms/ios/build_framework.py", line 81, in _build
      self.buildOne(t[0], t[1], mainBD, cmake_flags)
    File "/Users/christoshadjinikolis/Downloads/opencv-3.1.0/platforms/ios/build_framework.py", line 139, in buildOne
      execute(buildcmd + ["-target", "ALL_BUILD", "build"], cwd = builddir)
    File "/Users/christoshadjinikolis/Downloads/opencv-3.1.0/platforms/ios/build_framework.py", line 34, in execute
      retcode = check_call(cmd, cwd = cwd)
    File "/Users/christoshadjinikolis/anaconda/lib/python2.7/subprocess.py", line 540, in check_call
      raise CalledProcessError(retcode, cmd)
  CalledProcessError: Command '['xcodebuild', 'ARCHS=x86_64', '-sdk', 'macosx', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '4', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65
  </code></pre>
  
  <p>Would appreciate your help. Thanks.</p>