“DLL load failed” when import cv2 (opencv)

前端 未结 15 1094
萌比男神i
萌比男神i 2020-12-14 08:45

In [windows server 2012 R2 x64, python 3.7 64x]

pip install opencv-contrib-python

installed without any error .
and when I try to impor

15条回答
  •  太阳男子
    2020-12-14 09:22

    its worked well for me.* Answer is Need to put cv2.pyd file to your virtual environment. need to put under two folder of envs,

    • first is under DLLS folder and Second is under Lib/site-packages

    To get cv2.pyd > download from this link https://sourceforge.net/projects/opencvlibrary/ and then extract the download file

    You will get opencv folder, after that go inside opencv folder like Downloads\opencv\build\python\2.7 and go one deeper folder depend on your 32 or 64 window version

    Copy cv2.pyd Important **** after copying cv2.pyd file to your envs, you need to rename cv2.pyd to _cv2.pyd

提交回复
热议问题