CV2 installed, but Import cv2 on spyder gives an error

asked 2019-07-17 03:36:26 -0600

Hi, yesterday I tried different approaches to install OpenCV.

when I go to the following directory: "C:\Users\Salvo\Anaconda3\Lib\site-packages\cv2" I can find the package is installed. I have windows 10, python 3.7 installed. when I open Spyder (or also Jupyter notebook) i receive the same error.

import cv2 as cv Traceback (most recent call last):

File "<ipython-input-8-9458db612e9e>", line 1, in <module> import cv2 as cv

File "C:\Users\Salvo\Anaconda3\lib\site-packages\cv2__init__.py", line 3, in <module> from .cv2 import *

ImportError: DLL load failed: he specified module could not be found. which is weird because all the packages are there and inside the cv2 folder I found __init__.py file. Thank you for your help

edit retag flag offensive close merge delete

Comments

Your problem should be solved even if you try this @tianxiawuzhe import cv2

supra56 gravatar imagesupra56 ( 2019-07-17 08:10:44 -0600 )edit

thank you, but just because I want to be sure and do not mess up. they suggested to download : https://www.dll-files.com/api-ms-win-... and copy the file inside C:\Windows\System32 and C:\Windows\SysWOW64. they have windows 7 and 32 bit, I have windows 10 and 64, which you suggest to download?

salvo88 gravatar imagesalvo88 ( 2019-07-17 08:43:25 -0600 )edit