0

import cv2

ImportError Traceback (most recent call last) in ----> 1 import cv2

~\Anaconda3\lib\site-packages\cv2__init__.py in 3 import sys 4 ----> 5 from .cv2 import * 6 from .data import * 7

ImportError: DLL load failed: The specified module could not be found

1
  • Can you mention on which system you installed it and what was the command you used ? Commented Apr 28, 2020 at 16:31

2 Answers 2

1

Looks like you are using Anaconda. If so don't use pip as it can break your environment, use conda.

You can try by first going to "anaconda-prompt" using windows search and then run the command as below:

conda install -c conda-forge opencv

or any other from https://anaconda.org/conda-forge/opencv.

Sign up to request clarification or add additional context in comments.

Comments

0

Maybe you can uninstall and install opencv. This usually happens when you download package at a different file location or the package itself is not installed properly. I suggest using this:

1.pip install opencv-python

or if you need the full module (cnn, face analysis, shape and etc)

2.pip install opencv-python-contrib

1 Comment

you are correct when we need to install the package on bare machine, here issue is with anacoda environment.so we shld try what @vardan-agarwal reported above - conda install -c conda-forge opencv

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.