ImportError: DLL load failed while importing cv2
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1k
- Avg merge
- 22h 17m
- Merged PRs (30d)
- 3
Description
I have a problem "ImportError: DLL load failed while importing cv2: The specified module could not be found"
Information about my attempted installation
Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32
MSVC: Microsoft Visual Studio 2019
OS: Win 10
CMake gui: 3.29.2
Source cv2 files version: 4.5.0
I'm compiling opencv from source and it's all working fine, but when instantiating cv2, I get the "Import DLL .... " error occurred.
Python 3.8.10 opencv 4.5.0 opencv_contrib-4.5.0
What is the DLL file that failed to load? Why is this happening?
Also I would like to know if it is possible to make opencv implement CUDA acceleration by compiling opencv source code in the python case. If it is possible how to implement it?
Thank you,
Anthony of Sydney
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the cv2 import failure with the stated Python, Windows, CMake, and source-build versions, then inspect the generated DLL dependencies to identify what cannot be loaded. Review the build configuration for CUDA support and verify that the resulting Python module imports successfully and reports CUDA availability.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- build-system, computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100