windows platform and linuxplatformInstallationSee the official documentation: http://docs.opencv.org/3.2.0/da/df6/tutorial_py_table_of_contents_setup.html
The official platform cannot be found when installed under mac. Reference:
https://www.learnopencv.com/install-opencv-3-on-yosemite-osx-10-10-x/
Core instructions Just two sentences, super simple.
brew tap homebrew/science brew install opencv3
#But we also encountered a bunch of problems. The recording process is as follows:
1.
brew install opencv3
Error report:
Error: You must `brew link openexr` before homebrew/science/opencv3 can be installed
2. I thought there was no To install openexr, I checked http://www.openexr.com/ and I think it’s okay not to install it. There happens to be the --without-openexr option, so:
brew install opencv3 --without-openexr
Error report:
Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink share/aclocal/cmake.m4/usr/local/share/aclocal is not writable. You can try again using: brew link cmake ………………
brew link pkg-config
Error: Could not symlink share/aclocal/pkg.m4/usr/local/share/aclocal is not writable.
sudo brew link pkg-config
Error: Running Homebrew as root is extremely dangerous and no longer supported.
whoami# 下面两个命令中的‘whoami’用刚才命令的输出代替sudo chown -R 'whoami':admin /usr/local/share sudo chown -R 'whoami':admin /usr/local/local/bin
brew link pkg-configbrew link cmake brew install opencv3 --without-openexr
python environment. I am linking to the tensorflow1.0 environment built by anaconda
cd /Users/yuetiezhu/anaconda2/envs/tensorflow1.0/lib/python2.7/site-packagesln -s /usr/local/Cellar/opencv3/3.2.0/lib/python2.7/site-packages/cv2.so cv2.so
source activate tensorflow1.0python import cv2
The above is the detailed content of Instructions for installing OpenCV3.2 on MacOS X. For more information, please follow other related articles on the PHP Chinese website!