First time here? Check out the FAQ!

Ask Your Question
0

Python - Failure to import cv2: DLL load failed

asked May 22 '17

hoang anh tuan gravatar image

I refered to this link. But it did not help me.

I installed python 2.7 and opencv 3.2.0. cv2.pyd exist in the Python34\Lib\site-packages folder. When i run the following code

import cv2

Python shows the above error.

Help me! Thank for supporting!

Preview: (hide)

Comments

Are you limited in using 3.2.0? If no I suggest to try prebuilt wheels: http://www.lfd.uci.edu/~gohlke/python...

electron gravatar imageelectron (May 22 '17)edit

@electron: No. I build opencv 3.2.0 normal. Not limit.

hoang anh tuan gravatar imagehoang anh tuan (May 23 '17)edit

How to run your file?

hoang anh tuan gravatar imagehoang anh tuan (May 23 '17)edit

download wheel and install it using pip: pip install path_to_wheel

electron gravatar imageelectron (May 23 '17)edit

btw, seems that you are trying to use in Python37 opencv installed for Python34. Check if you're using correct python versin and make sure that python is in PATH

electron gravatar imageelectron (May 23 '17)edit

2 answers

Sort by » oldest newest most voted
0

answered May 25 '17

hoang anh tuan gravatar image

I solved it. My solution is: - Copied all "dll" libraries from release folder to "C:\Python27"

Preview: (hide)
0

answered Jul 2 '18

Python 3.X or Anaconda users, use the below in the prompt <pip install="" opencv-python="">

Preview: (hide)

Comments

I tried this and I got the same error. I am using this on windows and I do not have idea about windows. Do I need to add some path variables?? even for conda environment

Garvita gravatar imageGarvita (Sep 18 '18)edit

Question Tools

1 follower

Stats

Asked: May 22 '17

Seen: 9,972 times

Last updated: Jul 01 '18