0

I have downloaded OpenCV2.1 and Python2.6.

when i try to import cv using sys.path.append("C:\OpenCV2.1\Python2.6\Lib\site-packages") and then import cv, it tells me ImportError: DLLload failed..

I have tried the solutions given in previous thread to copy the two files in the above path to C:\Python26\Lib\site-packages, but i still can't import cv.

Is it because I missed out doing some steps after installing? What could be the reasons to why the system cannot find the module cv?

1
  • 1
    Are the opncv dll's on the path or somewhere that python can find Commented Aug 17, 2011 at 16:51

1 Answer 1

1

The OpenCV DLLs seem not to be found. Did you add OpenCV's bin directory to your PATH, "C:\OpenCV2.1\bin" in your case?


To use the Python wrappers

sys.path.append("C:\OpenCV2.1\Python2.6\Lib\site-packages")
import cv

should work, as well as copying cv.lib and cv.pyd to your C:\Python26\Lib\site-packages (assuming you installed Python to C:\Python26).

But those wrappers have to find the DLLs they should wrap. So make sure, they are in a path Python can find them.

Maybe this question Installing OpenCV on Windows 7 for Python 2.7 may help, especially Gia Thuy's journal post he mentions in his answer. Although he uses Python 2.7 and OpenCV 2.2, the procedure remains the same.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.