DLL load failed while importing cv2: The specified module could not be found

I have installed an OpenCV in anaconda using command pip install opencV-python.

Everything was installed normally but when I’m trying to import it as import cv2 in Jupyter Notebook it gives me the following error.

I have tried many things but still wasn’t able to figure out what’s the problem as I’m a newbie to this whole setup.

Can someone please help me out with this issue?

does your code work from a plain console repl ?
are you sure, your jupiter notebook is using the same python version, you installed opencv to ?

No, it does not work on plain console.

Yes, I’ve crossed checked it several times. It’s using the same version.

Did you manually install/build and install or otherwise (e.g. with conda) previously try to install opencv before installing with pip?

I had manually installed python which already comes up with pip.

After installing it I run the command pip install opencv-contrib-python to install opencv.

Everything goes normally but when I try to import cv2 it gives the error.

Till now I watched around 20 tutorials but in vain.

How did you manually install it? Where did you put the shared library opencv_world451, is it on the python/system/user path? Which OS are you using and did you build opencv with any dependencies whose shared libraries may be missing? Where did you place cv2.cp3x-win_amd64.pyd?

I installed python from the python installer.

I don’t know where the file opencv_world451 is, as I haven’t touched it.

I’m using the Windows 10 operating system and no I haven’t build OpenCV with any dependencies

The cv2.cp3x-wind_amd64.oyd is under C:\Users\Mudassir\AppData\Roaming\Python\Python39\site-packages\cv2 directory.