Can't import cv2

Hi,
I was try to install Opencv with CUDA by this script
https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.0.0_Nano.sh
When it say install completely and I try to import cv2 but always say

ImportError: No module named cv2

How can I import it ?

Hi,

Please remember to add the building folder into the environment variable.

The python package is located at {folder}/opencv-4.0.0/release/python_loader and try to update the pythonpath like this:

export PYTHONPATH=$PYTHONPATH:/path/to/your/folder/opencv-4.0.0/release/python_loader/

Thanks.

1 Like