Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get UnsatisfiableError when Installing OpenCV for Python through Anaconda on Windows

I've tried installing OpenCV on Windows through Anaconda Navigator and Anaconda Prompt, but I get the same error:

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


Package hdf5 conflicts for:
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']
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.03=py37_0 -> hdf5==1.10.4=h7ebc959_0
h5py -> hdf5[version='>=1.10.1,<1.10.2.0a0,>=1.10.2,<1.10.3.0a0,>=1.8.18,<1.8.19.0a0,>=1.8.20,<1.9.0a0']
Package mkl-service conflicts for:
mkl-service
Package zipp conflicts for:
importlib_metadata -> zipp[version='>=0.3.2,>=0.5']
zipp
anaconda==2019.03=py37_0 -> importlib_metadata==0.8=py37_0 -> zipp[version='>=0.3.2']
Package importlib_metadata conflicts for:
anaconda==2019.03=py37_0 -> importlib_metadata==0.8=py37_0
like image 517
Sean Avatar asked Jul 22 '19 03:07

Sean


2 Answers

I was even getting conflicts while trying to install opencv via conda. Therefore I tried to use the below pip command here to install opencv.

pip install opencv-python

You will see opencv starts getting installed on your system, the size is approx 37MB

To check the version of opencv and other installed packages

Use the command:

conda list

It will list all installed packages with their version number

To use opencv in python script, use the below import:

import cv2
print(cv2.__version__) #prints the version of opencv installed
like image 77
prashant kumar shekhar Avatar answered Nov 12 '22 15:11

prashant kumar shekhar


Anaconda 2019.07 , same problems , i figure it out ,that may help you.

try using conda update --all update your packages in Conda, then there will be some notifications, which means some packages need to be installed to satisfy the requests. just input 'y' to comfirm. y then opencv should be started installing after that use import cv2 cv2.__version__can print opencv's version '3.4.1'

like image 28
XC L Avatar answered Nov 12 '22 16:11

XC L