Configuring OpenCV with Python on Mac, but failed to compile
Question: I was trying to configure the OpenCV with Python 2.7 on a MacOSX environment,
I use the Homebrew to install OpenCV, and it works perfect with C++, but when
I attempted to compile a python file by typing `python test.py`, it gives me
the error saying that

    
    
      File "test.py", line 1, in <module>
    import cv ImportError: No module named cv
    

I tried the solution by adding `export
PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH` into
`.bash_profile` for my home folder.

However, it does not solve my compiling issue.

Any solution for this issue? Thanks.


Answer: According to solution found in comments, it's because you have unmet `numpy`
dependency. Use following:

    
    
    sudo pip install numpy
    brew install opencv
    

