MacOS x Installation OpenCV3.2 instructions

Source: Internet
Author: User
Tags symlink
Windows platform and Linux platform installation see official documentation: http://docs.opencv.org/3.2.0/da/df6/tutorial_py_table_of_contents_setup.html

The Mac installation is not found on the official platform. Reference:

https://www.learnopencv.com/install-opencv-3-on-yosemite-osx-10-10-x/

The core directive is two sentences, super simple.

Brew Tap Homebrew/sciencebrew Install Opencv3


But there are a bunch of problems. The recording process is as follows:

1.

Brew Install Opencv3


Error:

Error:you must ' brew link OpenEXR ' before homebrew/science/opencv3 can be installed


2. Thought did not install OPENEXR, checked a bit http://www.openexr.com/think not to install also can, just have--without-openexr this option, therefore:

Brew Install Opencv3--WITHOUT-OPENEXR


Error:

Error:the ' Brew link ' step did not complete successfullythe formula built, but isn't symlinked into/usr/localcould not Symlink share/aclocal/cmake.m4/usr/local/share/aclocal is not writable. You can try again using:  Brew link CMake ....... .....


3. Follow the prompts:

Brew Link Pkg-config

Error:

Error:could not symlink share/aclocal/pkg.m4/usr/local/share/aclocal are not writable.

4. Oh, no permission. So:

sudo brew link pkg-config

Error:

Error:running Homebrew as Root is extremely dangerous and no longer supported.

5. The original does not allow, then had to change the folder permissions

whoami# the following two commands of ' whoami ' replace sudo with the output of the command just now Chown-r ' whoami ': admin/usr/local/share         sudo chown-r ' whoami ': admin/usr/ Local/local/bin

Brew link Pkg-configbrew link cmakebrew install opencv3--WITHOUT-OPENEXR

Success, estimated the first step in the beginning of the error, is not without permission to establish software connection problems.

6. Link to the Python environment, I'm linking to the Anaconda built tensorflow1.0 environment

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

/usr/local/cellar/opencv3/3.2.0/lib/python2.7/site-packages no cv.py, only cv2.so, but it can be used.

7. Test

SOURCE Activate Tensorflow1.0pythonimport Cv2
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.