Python 如何解决Anaconda中的环境安装问题?

Python 如何解决Anaconda中的环境安装问题?,python,opencv,anaconda,Python,Opencv,Anaconda,我正在尝试使用Anaconda提示符安装OpenCV。我试过anaconda和conda forge版本 使用上述命令后:- conda安装-c menpo opencv 我收到以下信息:- Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving env

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

使用上述命令后:-

conda安装-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']
收集包元数据(current_repodata.json):完成
解决环境:初始冻结解决失败。用灵活的解决方法重试。
解决环境:使用当前_repodata.json中的repodata失败,将使用下一个repodata源重试。
收集包元数据(repodata.json):完成
解决环境:初始冻结解决失败。用灵活的解决方法重试。
解决环境:/
发现冲突!正在查找不兼容的包。
这可能需要几分钟。按CTRL-C以中止。

检查oauthlib请求:1%|▎ | 2/347[00:00 hdf5[版本='>=1.10.1,=1.10.2,=1.10.4,=1.8.18,=1.8.20,=1.10.2,=1.8.18,=1.8.20,=1.10.1,=1.10.4,=1.8.18,=1.8.18,看起来hdf5与您的安装冲突。 您应该尝试使用conda创建一个新的虚拟环境,并在安装openCV之前从该虚拟环境中删除hdf5。这样您就安全了

您可以执行以下操作:

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