You won’t believe that I’ve been struggling with running OpenCV for over a week and a half now. I’ve tried installing it in every possible way, but I keep encountering an issue when trying to import cv2 in Python command prompt. The problem is that there is no cv2.cp310-win_amd64.pyd file generated after the build process. I’ve tried several versions of OpenCV and Python, as well as Visual Studio 2022 and 2019.
Here are some details about my setup:
Windows 11
CUDA 12.4.1
cuDNN 9.1.1
opencv-4.x.zip + opencv_contrib-4.x.zip
I’ve also tried OpenCV versions 4.9, 4.8, and 4.5.5
I’ll attach the logs from CMake configurations and the build process from Visual Studio for your reference.
Note: After completing the installation and accessing the Python file in Visual Studio Code, import cv2
from cv2 import dnn_superres
works without any issues. However, I’m unable to use the code in the command prompt.