【问题标题】:How to deal with solving environment installation issue in Anaconda?如何处理解决 Anaconda 中的环境安装问题?
【发布时间】:2019-10-17 07:30:10
【问题描述】:

我正在尝试使用 Anaconda 提示符安装 OpenCV。我已经尝试过 anaconda 和 conda-forge 版本。

使用article's提到的命令后:-

conda install -c menpo opencv

我收到以下消息:-

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.
Examining requests-oauthlib:   1%|▎                                                    | 2/347[00:00<00:06, 53.66it/s]\
Examining py:  44%|████████████████████████████▊                                    | 154/347 [00:00<00:00, 977.99it/s]|
Examining locket:  83%|█████████████████████████████████████████████████▊          | 288/347 [00:00<00:00, 1078.27it/s]/
failed


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



Package hdf5 conflicts for:
anaconda==2019.10 -> h5py==2.9.0=py36h5e291fa_0 -> hdf5[version='>=1.10.4,<1.10.5.0a0']
h5py -> hdf5[version='>=1.10.1,<1.10.2.0a0|>=1.10.2,<1.10.3.0a0|>=1.10.4,<1.10.5.0a0|>=1.8.18,<1.8.19.0a0|>=1.8.18,<1.9.0a0|>=1.8.20,<1.9.0a0']
hdf5
opencv -> hdf5[version='>=1.10.2,<1.10.3.0a0|>=1.8.18,<1.8.19.0a0|>=1.8.20,<1.9.0a0']
anaconda==2019.10 -> hdf5==1.10.4[build='h7ebc959_0|h530792d_0']
pytables -> hdf5[version='>=1.10.1,<1.10.2.0a0|>=1.10.2,<1.10.3.0a0|>=1.10.4,<1.10.5.0a0|>=1.8.18,<1.8.19.0a0|>=1.8.18,<1.9.0a0']

Error image

有人可以帮忙吗?我想在 Anaconda 的 spyder 中运行 opencv

康达 4.7.12 Python 3.7.4 操作系统:Win10 x64

【问题讨论】:

    标签: python opencv anaconda


    【解决方案1】:

    看起来 hdf5 与您的安装冲突。 您应该尝试使用 conda 创建一个新的虚拟环境,并在安装 openCV 之前从该虚拟环境中删除 hdf5。这样你就安全了。

    你可以这样做:

    conda create --name test_env
    conda activate test_env
    conda remove hdf5
    conda install -c conda-forge opencv
    

    【讨论】:

      猜你喜欢
      • 2021-08-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-29
      • 2014-10-11
      • 1970-01-01
      • 2020-04-11
      • 2019-07-15
      相关资源
      最近更新 更多