opencv: Import cv2 raises error, file in boostrap and DLL load failed
- OpenCV = latest
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017
- Python 3.7.7
Detailed description
Please help, I had no luck on the opencv forum. I was able to succesfully install opencv with CUDA 10.2, but for the framework I am running it with, I needed CUDA 10.0. I am experiencing errors when importing cv2.
Steps to reproduce
I built opencv with cmake, and experienced no errors but “CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):” in which I unchecked it and the error resolved. After successfully building in VS, these are the commands and errors that followed:
C:\>python
Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python37\cv2\__init__.py", line 96, in <module>
bootstrap()
File "C:\Python37\cv2\__init__.py", line 86, in bootstrap
import cv2
ImportError: DLL load failed: The specified module could not be found.
>>>
How can I resolve these or any idea what causes this? I made sure the correct path was in my path in systems variable (C:\opencv\build\install\x64\vc15\bin).
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (1 by maintainers)
I ended up not worrying about python binding with opencv. All i need is the c++ version of opencv. I checked the build information from visual studio with c++ and its working correctly .