It took a while to figure out the issues during installing the OpenCV to my mac machine.
Here are the steps that I followed to fix it. maybe it could help you too...
I have opened the Terminal and gave "pip install OpenCV-python". Here the problem starts...
$ sudo -H pip install opencv-python
Password:
Collecting opencv-python
Downloading https://files.pythonhosted.org/packages/ae/f7/01fc83414fbdbb470d6d77ee4a0fd32234046edc4a2e4f7897e3e95ee666/opencv_python-3.4.2.17-cp27-cp27m-macosx_10_6_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (42.2MB)
100% |████████████████████████████████| 42.3MB 244kB/s
Collecting numpy>=1.11.1 (from opencv-python)
Downloading https://files.pythonhosted.org/packages/e7/c1/d5c47de35e366b1c2f60da88a24b25d3037b892417c5c3c5398313fb54f5/numpy-1.15.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (24.5MB)
100% |████████████████████████████████| 24.5MB 569kB/s
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
Installing collected packages: numpy, opencv-python
Found existing installation: numpy 1.8.0rc1
Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
oops, here 😈 starts...
But no worries I got your back.
Here are the few steps that could solve it.
1) Install the tornado package.
$ sudo -H pip install tornado
Collecting tornado
Downloading https://files.pythonhosted.org/packages/45/ec/f2a03a0509bcfca336bef23a3dab0d07504893af34fd13064059ba4a0503/tornado-5.1.tar.gz (516kB)
100% |████████████████████████████████| 522kB 1.5MB/s
Collecting futures (from tornado)
Downloading https://files.pythonhosted.org/packages/2d/99/b2c4e9d5a30f6471e410a146232b4118e697fa3ffc06d6a65efde84debd0/futures-3.2.0-py2-none-any.whl
Collecting singledispatch (from tornado)
Downloading https://files.pythonhosted.org/packages/c5/10/369f50bcd4621b263927b0a1519987a04383d4a98fb10438042ad410cf88/singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting backports_abc>=0.4 (from tornado)
Downloading https://files.pythonhosted.org/packages/7d/56/6f3ac1b816d0cd8994e83d0c4e55bc64567532f7dc543378bd87f81cebc7/backports_abc-0.5-py2.py3-none-any.whl
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from singledispatch->tornado) (1.4.1)
Installing collected packages: futures, singledispatch, backports-abc, tornado
Running setup.py install for tornado ... done
Successfully installed backports-abc-0.5 futures-3.2.0 singledispatch-3.4.0.3 tornado-5.1
2) Then install the nose package. "sudo -H pip install nose"
3) Actually, this should be the final step but as I have the older version of numpy. It has thrown a stone against 💣💣.
$sudo -H pip install opencv-python
Collecting opencv-python
Using cached https://files.pythonhosted.org/packages/ae/f7/01fc83414fbdbb470d6d77ee4a0fd32234046edc4a2e4f7897e3e95ee666/opencv_python-3.4.2.17-cp27-cp27m-macosx_10_6_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting numpy>=1.11.1 (from opencv-python)
Using cached https://files.pythonhosted.org/packages/e7/c1/d5c47de35e366b1c2f60da88a24b25d3037b892417c5c3c5398313fb54f5/numpy-1.15.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: numpy, opencv-python
Found existing installation: numpy 1.8.0rc1
Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
4) So to solve the above issue the numpy need to be updated.
$ sudo -H pip install --ignore-installed numpy
Collecting numpy
Downloading https://files.pythonhosted.org/packages/e7/c1/d5c47de35e366b1c2f60da88a24b25d3037b892417c5c3c5398313fb54f5/numpy-1.15.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (24.5MB)
100% |████████████████████████████████| 24.5MB 642kB/s
Installing collected packages: numpy
Successfully installed numpy-1.15.1
5) Now we are ready to install OpenCV
$ sudo -H pip install opencv-python
Collecting opencv-python
Using cached https://files.pythonhosted.org/packages/ae/f7/01fc83414fbdbb470d6d77ee4a0fd32234046edc4a2e4f7897e3e95ee666/opencv_python-3.4.2.17-cp27-cp27m-macosx_10_6_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Requirement already satisfied: numpy>=1.11.1 in /Library/Python/2.7/site-packages (from opencv-python) (1.15.1)
Installing collected packages: opencv-python
Successfully installed opencv-python-3.4.2.17
Hope this helps 👍 .....