解决环境:失败

时间:2019-07-15 08:01:06

标签: python-3.x anaconda opencv3.0 environment failed-installation

当我尝试安装OpenCV3时,它显示此错误,而其他库也正在安装...

(base) C:\WINDOWS\system32>conda install -c menpo opencv3
Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

  - _ipyw_jlab_nb_ext_conf -> ipywidgets -> widgetsnbextension[version='>=1.2.3'] -> notebook[version='>=4.2.0'] -> nbconvert -> bleach
  - bleach
  - ipywidgets -> widgetsnbextension[version='>=1.2.3'] -> notebook[version='>=4.2.0'] -> nbconvert -> bleach
  - jupyterlab -> jupyterlab_server[version='>=0.2.0,<0.3.0'] -> notebook -> nbconvert -> bleach
  - jupyterlab_server -> notebook -> nbconvert -> bleach
  - nbconvert -> bleach
  - notebook -> nbconvert -> bleach
  - pip -> python[version='>=3.6,<3.7.0a0']
  - widgetsnbextension -> notebook[version='>=4.2.0'] -> nbconvert -> bleach


2 个答案:

答案 0 :(得分:0)

创建一个新的conda环境并从那里安装opencv。在默认的conda环境中很有可能发生依赖冲突。

conda create -n opencv4
conda activate opencv4
conda install -c conda-forge opencv

至少这对我有效。

答案 1 :(得分:0)

问题是通道优先级很严格。尝试设置以下内容以解决问题:

conda config --set channel_priority flexible