When I installed OpenCV using Homebrew (brew), I got this problem whenever I run this command to test python -c \"import cv2\":
Run
If you are stuck with a machine where you don't have root access, then it is better to deal with a custom Python installation.
The Anaconda installation worked like a charm:
After installation,
[bash]$ /xxx/devTools/python/anaconda/bin/pip list --format=columns | grep numpy
numpy 1.13.3 numpydoc 0.7.0