Anaconda OpenCV import error

0

I am currently using conda version 4.6.14 with python 3.7.3, I successfully installed OpenCV in the anaconda shell using conda install -c conda-forge opencv but when I run python in the shell and type in import cv2 it gives the following error:

**>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.**

I found some fixes online saying I have to replace the DLL file in the Anaconda folder by downlading the file from my python release zip file but even that did not work.

Does it problem arise because of my machine or is it common? How do I fix it?

deadshot

Posted 2019-05-16T07:23:32.960

Reputation: 1

Answers

0

The solution in my case was to install the Pypi OpenCV package:

python -m pip install opencv-python

(currently opencv-python-4.1.0.25 for python 3.6.8 on my system configuration)

I also encountered the same issue several times, I haven't figured out why this is broken, my configuration is Windows 10 64-bits I get the same error, I tried installing/uninstalling other libraries like libopencv/python-opencv/... with no success. What is more puzzling is that there's been several updates of OpenCV binaries for version 4.1 on python 3.6.8 but no one seems to be working (tried downloading and installing several archives manually).

Luis Kabongo

Posted 2019-05-16T07:23:32.960

Reputation: 101