When I install OpenCV, I get an error as shown below. What should I do?
ImportError: DLL load failed: The specified module could not be found.
CodePudding user response:
Installing OpenCV
To install a package in Jupyter Notebook, you can use the magic %pip
command.
%pip install opencv-python
If the above command doesn't work on IPython < 7.3
, you can try this command instead.
!pip install --user opencv-python
Demonstration
Let's see it in action. First, you insert a new cell, type in either of the two commands above, and then execute the cell using the Ctrl Enter shortcut.
You should now be able to import and use OpenCV without any errors.
CodePudding user response:
This is usually a dependency issue. Just .pyd is not enough (all .DLLs are required). On Windows add entries to .dll into PATH environment variable (not enough for Python 3.8 with updated security policies)