Error in installing opencv3 with homebrew and python3

Sun Ke picture Sun Ke · Mar 30, 2017 · Viewed 9.1k times · Source

I'm using homebrew installing opencv3 on OSX(EI Captain),

brew install opencv3 --with-contrib --with-python3 --HEAD

and an error occurred:

Updating Homebrew...
==> Installing opencv3 from homebrew/science
==> Cloning https://github.com/opencv/opencv.git
Updating /Users/ksun/Library/Caches/Homebrew/opencv3--git
==> Checking out branch master
==> Cloning https://github.com/opencv/opencv_contrib.git
Updating /Users/ksun/Library/Caches/Homebrew/opencv3--contrib--git
> ==> Checking out branch master
Error: No such file or directory - /private/tmp/opencv3-20170330-14255-bxsn05/3rdparty/ippicv/downloader.cmake

Can u guys help me find out how to fix it?

Answer

yjmade picture yjmade · Apr 2, 2017

I do brew edit opencv3, then comment the following line

inreplace buildpath/"3rdparty/ippicv/downloader.cmake",
  "${OPENCV_ICV_PLATFORM}-${OPENCV_ICV_PACKAGE_HASH}",
  "${OPENCV_ICV_PLATFORM}"

then you can reinstall again with --HEAD

The opencv repository has fix some issue also removed file 3rdparty/ippicv/downloader.cmake, so no need to patch it any more. But they didn't issue a new release, so to install --with-contrib, you have to install with --HEAD, but disable the patch of file 3rdparty/ippicv/downloader.cmake