我正在尝试在我的 Mac 上安装 OpenCV-python,我使用了以下内容:
$pip 安装 opencv-python
这给了我以下错误:
$pip install opencv-python
Collecting opencv-python
Using cached opencv_python-3.4.0.12-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
Collecting numpy>=1.11.1 (from opencv-python)
Using cached numpy-1.14.2-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
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.
然后我确实尝试了pip install --upgrade matplotlib
这并没有改变任何东西。它只是告诉我:
matplotlib 2.2.2 requires backports.functools-lru-cache, which is not installed.
matplotlib 2.2.2 has requirement numpy>=1.7.1, but you'll have numpy 1.8.0rc1 which is incompatible.
正如我发现在互联网上安装 openCV-python 的许多方法一样: https ://www.pyimagesearch.com/2015/06/15/install-opencv-3-0-and-python-2-7-on- osx/
我安装在我的另一台 Mac 上,但我的代码中有很多导入 cv2 问题。如果有人有好的解决方案或建议来安装 openCV-python,我将非常高兴。
谢谢