简体   繁体   中英

from .cv2 import * ImportError: DLL load failed: The specified module could not be found

I used to play with opencv but now I am not able to use it. When I enter :

import cv 2

I get

import cv2
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import cv2
  File "C:\Program Files\Python36-32\lib\site-packages\cv2\__init__.py", line 3, in <module>
    from .cv2 import *
ImportError: DLL load failed: The specified module could not be found.

I have 32 bit Windows 7 and Python 3.6.

I had an issue that really looked like this one. I installed OpenCV on an conda envrionement and someone had installed numpy unsing pip on the base environment.

Please check that:

  • all your installed package come from compatible sources
  • You don't have the same package installed twice

The only way that I could fix the issue was starting from a fresh environment.

Hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM