简体   繁体   中英

Issue : Installing Opencv and python 2.7.5 on Mac

I am trying to install OpenCV on MacOs I am folwoing this tutorial http://www.jeffreythompson.org/blog/2013/08/22/update-installing-opencv-on-mac-mountain-lion/

When I reach this point, I got this error

$ brew install opencv

opencv: Unsatisfied dependency: numpy
External Python cannot `import numpy`. Install with:
  pip-2.7 install numpy
Error: An unsatisfied requirement failed this build.

I installed NumPy by using https://github.com/fonnesbeck/ScipySuperpack I used as well :

$ git clone https://github.com/numpy/numpy.git
$ git clone https://github.com/scipy/scipy.git
$ cd numpy
$ python setup.py build && python setup.py install
$ brew install gfortran
$ cd ../scipy
$ python setup.py build && python setup.py install

when I go to install OpenCV I got this problem :

$ brew install opencv
opencv: Unsatisfied dependency: numpy
External Python cannot `import numpy`. Install with:
  pip-2.7 install numpy

but I still getting the same problem

A likely cause for your problem is that you have several python versions on your system (The default installation that comes with OSX and your SciPy superpack installation, and possibly others) and brew doesn't find the installation for which you have Numpy.

I would recommend installing OpenCV via Macports , which will save you a lot of headaches related to choosing which version of python to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM