Skip to content Skip to sidebar Skip to footer

Import Cv2 Failed - Installing OpenCV For Python 2.7 For Windows

I am trying to install OpenCV-python for Windows from this link - http://docs.opencv.org/trunk/doc/py_tutorials/py_setup/py_setup_in_windows/py_setup_in_windows.html#install-opencv

Solution 1:

As you can see in the error message there is some problem with loading one (or more) DLL. Basing on this error message it's impossible to tell which file is missing, you need to use Dependency walker to check it (open cv2.pyd file using this tool). It will give list of files which are required to load cv2.pyd. Files with yellow ? sign are missing and MAY (but may not..) cause your problem. For me following files are missing:

API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
EXT-MS-WIN-NTUSER-UICONTEXT-EXT-L1-1-0.DLL
IESHIMS.DLL

but everything is working fine. Most likely Dependency walker will tell that some opencv files are missing (like opencv_core***.dll *** - version number). Put them in the same directory as cv2.pyd or add their location to python_path variable.
If it will not solve your problem give us more informations about what you have already tried - googling for opencv python DLL load failed gives lot of results and generally you should try them before posting qustion.


Post a Comment for "Import Cv2 Failed - Installing OpenCV For Python 2.7 For Windows"