gayathri
gayathri

Reputation: 1

i installed opencv-python getting import error

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

Upvotes: 0

Views: 343

Answers (2)

Vardan Agarwal
Vardan Agarwal

Reputation: 2181

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.

Upvotes: 1

Brody_Brody
Brody_Brody

Reputation: 315

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

Upvotes: 0

Related Questions