Install openCV 3 or 4 with Python/Anaconda 3.7 and macOS 10.15?

给你一囗甜甜゛ 提交于 2020-08-10 19:55:09

问题


I have macOS 10.15.3 with an Anaconda installation of Python 3.7 and I would like to install some version of openCV 3 or 4 for some basic functionality. This answer to Can't install OpenCV3 on Anaconda3 python3.6 on macOS recommends

conda install -c menpo opencv3

But I have 3.7 and a newer macOS. It fails and gives the output quoted below.

This answer recommends

conda install opencv

but this also fails but is still running for quite a long time searching for conflicts.

Partial success

This answer suggests

conda install -c anaconda opencv

It seems to have worked successfully and I now have openCV version 3.4.2

This will get me started, but what can should I do when I want to move to openCV version 4?

I have found Install OpenCV 4.0.1 from Source on macOS with Anaconda Python 3.7 to Use SIFT and SURF.

I don't need SIFT or SURF, but is that what I need to do?


These are the errors mentioned above:

Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - opencv3 -> python[version='2.7.*|3.4.*|3.5.*']

Your python: python=3.7

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

来源:https://stackoverflow.com/questions/63104942/install-opencv-3-or-4-with-python-anaconda-3-7-and-macos-10-15

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!