我正在嘗試在 mac 10.11 上安裝 opencv。我嘗試過 pip、pip3、conda、brew,但沒有成功。我還嘗試再次使用 virtualenv 創建環境,但沒有運氣,也就是說,我是一個完全的新手,所以我不知道我是否以正確的方式這樣做。我嘗試了許多版本的 opencv,從 3 到最新版本。
Homebrew 安裝在我的機器上,但是,我沒有 xcode(只有命令列工具),因為我無法獲得與我的 mac 兼容的版本。我不想列出嘗試使用 brew、pip 等進行安裝時收到的所有錯誤訊息,下面是我在嘗試使用 conda 時收到的訊息。我知道到目前為止,這個問題已經在不同的版本中被問過多次,但是,我無法通過查看這個社區來完成作業。我將不勝感激任何建議。
(env) (base) dims-mbp:my_project dimkoun$ conda install --channel https://conda.anaconda.org/menpo opencv3
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
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.8
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.
uj5u.com熱心網友回復:
您似乎正在嘗試安裝只知道 Python 3.5.* 的舊版本 (v3.1.0) opencv3。
uj5u.com熱心網友回復:
正如 Marcin Orlowski 所提到的,menporepo 中的 OpenCV 版本已經嚴重過時了。但是,conda-forge包含最新版本 4.5.3,并且具有 OSX/arm64 和 OSX/x_64 版本。趕緊跑
conda install -c conda-forge opencv
你應該準備好了。
uj5u.com熱心網友回復:
不要從 conda 安裝 OpenCV。這些軟體包中沒有一個是官方的,而且許多已經過時了。即使是 conda-forge 中的那些也落后了 6 個月。
相反,從 PyPI安裝opencv-python(異或類似的兄弟包opencv-contrib-python)。那是官方包。
pip3 install opencv-python
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/402938.html
標籤:
