How to deal with solving environment installation issue in Anaconda?

Viewed 5607

I'm trying to install OpenCV with Anaconda prompt. I've tried the anaconda and conda-forge versions.

After using the article's mentioned command:-

conda install -c menpo opencv

I get the following messages:-

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

Can someone please help with this? I want to run opencv in spyder in Anaconda

conda 4.7.12 Python 3.7.4 OS: Win10 x64

1 Answers

It looks like hdf5 is conflicting with your instalation. You should try to create a new virtual environement using conda, and from this venvironement remove hdf5 before installing openCV. You'll be safe this way.

You can do something like :

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