Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

build opencv for windows

Hey I am trying to build OpenCV 4.0 for Windows 10 with Python bindings and then use them with my anaconda environment. Unfortunately after I build everything and then try to do a "pip install (path to install folder)\python" it seems like it installed correctly but I get a recursion error similar to the recursion post I've provided below. I have also attempted to just copy the pyd and DLLs as suggested but I get an import error DLL couldn't be found. I have even tried to building with SHARED LIBS off and then copying and pasting that with and without DLLs and I still get the DLL couldn't be found error. Has anyone got this successfully built for windows 10 and an Anaconda env running python 3.7.1? if So can you help me figure it out.

link to recursion post

link to a post with static lib build

click to hide/show revision 2
retagged

updated 2018-12-07 18:56:15 -0600

berak gravatar image

build opencv for windows

Hey I am trying to build OpenCV 4.0 for Windows 10 with Python bindings and then use them with my anaconda environment. Unfortunately after I build everything and then try to do a "pip install (path to install folder)\python" it seems like it installed correctly but I get a recursion error similar to the recursion post I've provided below. I have also attempted to just copy the pyd and DLLs as suggested but I get an import error DLL couldn't be found. I have even tried to building with SHARED LIBS off and then copying and pasting that with and without DLLs and I still get the DLL couldn't be found error. Has anyone got this successfully built for windows 10 and an Anaconda env running python 3.7.1? if So can you help me figure it out.

link to recursion post

link to a post with static lib build

build opencv for windows

Hey I am trying to build OpenCV 4.0 for Windows 10 with Python bindings and then use them with my anaconda environment. Unfortunately after I build everything and then try to do a "pip install (path to install folder)\python" it seems like it installed correctly but I get a recursion error similar to the recursion post I've provided below. I have also attempted to just copy the pyd and DLLs as suggested but I get an import error DLL couldn't be found. I have even tried to building with SHARED LIBS off and then copying and pasting that with and without DLLs and I still get the DLL couldn't be found error. Has anyone got this successfully built for windows 10 and an Anaconda env running python 3.7.1? if So can you help me figure it out.

link to recursion post

link to a post with static lib build

EDIT:

I came across this post https://github.com/skvark/opencv-python/issues/36 and decided to give some of it a try and dumpbin.exe may have shed some more light on my situation when it comes to copy and pasting. I rebuilt my 4.0 source and used static libraries this time. I am also missing several of these dlls in my anaconda paths. I guess I need to manually grab some of these like the libgst*.dll DLLs. I'm not to sure if I need to grab what appear to be system dlls though. However since I am building static libraries now I think I only need to worry about the external DLLs.

dumpbin.exe C:\OpenCV\build\opencv-4.0.0\install\python\cv2\python-3.7\cv2.cp37-win_amd64.pyd /IMPORTS | findstr dll python37.dll libgstpbutils-1.0-0.dll libgstreamer-1.0-0.dll libgstriff-1.0-0.dll libglib-2.0-0.dll libgstapp-1.0-0.dll libgobject-2.0-0.dll GDI32.dll ole32.dll KERNEL32.dll USER32.dll OLEAUT32.dll COMDLG32.dll ADVAPI32.dll MF.dll MFReadWrite.dll d3d11.dll api-ms-win-downlevel-shlwapi-l1-1-0.dll