0

I am currently trying to install OpenCV on my Windows 10 pc using these documentations: https://pysource.com/2019/03/15/how-to-install-python-3-and-opencv-4-on-windows/

python pip -m install opencv_python‑4.0.1+contrib‑cp37‑cp37m‑win_amd64.whl

https://solarianprogrammer.com/2016/09/17/install-opencv-3-with-python-3-on-windows/

python pip -m install opencv_python‑4.0.1+contrib‑cp37‑cp36m‑win_amd64.whl

Both documentations installed everything just fine but every time I am trying to execute the command

python
import cv2

I get the following error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: module not found.

I searched for this error and found different approaches, for example reinstalling it manually via this site: https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv

But it didn't help. Also I checked for the python dll but it is in my current folder. Updating the environment settings didn't help as well.

I found then something about the Visual C++ Redistributables to be updated, but before installing something out of the blue, I'd like to know if that really might be the problem and where to download the redistributables to as I am not working with visual studio just the cmd command prompt. Also I found something about deinstalling python3 and installing python2.7 instead. Would that really be necessary?

MaChaToc
  • 139
  • 1
  • 12

1 Answers1

0

This problem occured due to different reasons, mentioned in other stackoverflow posts. Through this post I checked my windows 10 version, found out that it was Windows 10 Pro N and the media package was missing. So I installed it and activated it. But the dll problem still occured. Further search and I found this post. Again I checkd in my program list and downloaded the Visual C++ 2015 redistribution package. After a few restarts and further windows updates it finally worked.

Thanks to everyone for their help!

MaChaToc
  • 139
  • 1
  • 12