web-dev-qa-db-fra.com

Erreur lors de l'installation d'opencv3 avec homebrew et python3

J'utilise homebrew en installant opencv3 sur OSX (EI Captain),

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

et une erreur s'est produite:

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

Les gars peuvent-ils m'aider à savoir comment y remédier?

23
Sun Ke

Je fais brew edit opencv3, puis commentez la ligne suivante

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

vous pouvez ensuite réinstaller avec --HEAD

Le référentiel opencv a résolu un problème et a également supprimé le fichier 3rdparty/ippicv/downloader.cmake, donc plus besoin de le patcher. Mais ils n'ont pas publié de nouvelle version, donc pour installer --with-contrib, vous devez installer avec --HEAD, mais désactivez le patch du fichier 3rdparty/ippicv/downloader.cmake

19
yjmade

J'ai rencontré le même problème. Je l'ai résolu en exécutant brew install opencv3 --with-contrib --with-python3

Je pense que ce qui s'est passé, c'est que les gens ont mis à jour le dossier ../ 3rdparty/ippicv dans le référentiel de telle sorte que le fichier downloader.cmake n'est plus là, mais ils ne l'ont pas encore fait mis à jour la formule d'infusion.

installation de l'infusion sans --HEAD va construire opencv3.2.0, ce qui est assez bon pour moi.

8
wenxi

lorsque j'ai recherché le problème OpenCV Java, c'était le premier résultat. Publier ma réponse si quelqu'un utilisant OpenCV Java alors ce serait utile pour eux).

Je suivais cet article: https://opencv-Java-tutorials.readthedocs.io/en/latest/01-installing-opencv-for-Java.html

brew tap homebrew/science brew install opencv3 --HEAD --with-contrib --with-Java

J'ai essayé en supprimant --Head de la commande ci-dessus et je suis en mesure de l'installer avec succès.

brew install opencv3 --with-contrib --with-Java

selon cet article: https://github.com/Homebrew/homebrew-science/issues/5498

3

J'ai résolu le problème de la manière suivante:

$ brew edit opencv3

Recherchez le bloc de code suivant et commentez les 4 lignes:

if build.with?("python3") && build.with?("python")
  # Opencv3 Does not support building both Python 2 and 3 versions
  odie "opencv3: Does not support building both Python 2 and 3 wrappers"
end

Enfin, installez à l'aide de la commande d'installation de brew:

$ brew install opencv3 --with-contrib --with-python3

Référence: http://www.pyimagesearch.com/2017/05/15/resolving-macos-opencv-homebrew-install-errors/

1
Biranchi