I want to use opencv with GPU in order to speed things up. So I followed some tutorials on how to build opencv from source along with CUDA and cudnn.
I followed this tutorial without any problem, until the part where he
import cv2
in his terminal
My terminal showed that it can't find cv2 in the python environment.
Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
I looked for the reason of this and found some clues. This post showed that he encountered the same problem as mine.
Starting from not having binding
folder in OpenCV.lsn after creating build folder with Cmake GUI
Also, I do not have python2 or python3 under To build session of my build/bin/release/opencv_version_win32.exe
, instead they are in unavailable session.
However, for hours of trying to find valid solution, I still can't find anything that can help me. So I hope there are someone who also faced this problem and can help me with this.