As your using python 3.7 I would have thought you need to add the CUDA install directory to your path. e.g.
set path=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5\bin;%path%
before running python. You may also need to add the directory containing your OpenCV dll aswell
set path=C:/OpenCV_4.9.0/build/install;%path%
You should be able to track down the missing dll by using the approach in the guide below, but note you need to add the directories containing the missing dll’s to your path because you cannot use os.add_dll_directory
in your version of python.
Sorry I can’t be more help it has been a long time since I tried to install with python 3.7 and/or OpenCV 4.9 so I can’t remember exactly how they function.
Alternatively if you are still having a problem you could try using a pre-built wheel as long as you delete the C:/Code/Python/opencv-test/venv/Lib/site-packages/cv2/ directory first. See