I am using Windows Server 2012 R2 and Python 2.7, precisely:
Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)] on win32
the recent version of OpenCV library 3.4.2 isn't working and it produces the following error:
>>> import cv2
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import cv2
File "C:\Python27\lib\site-packages\cv2\__init__.py", line 3, in <module>
from .cv2 import *
ImportError: DLL load failed: The specified module could not be found.
So I downloaded older version OpenCV 3.4.1, copied cv2.pyd to C:/Python27/lib/site-packages and viola it works!
Now is this my fail or theirs? I downloaded VC++ x86 Redistributable 2015 and 2017, Python is also 32-bit, and I'm using a 32-bit version of OpenCV lib, so I don't think that's my issue, what's going on, does anyone know?
Try installing with pip? I've never had an issue with a pip installation of cv2.
pip install opencv-python
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.