OpenCV versions Conflict on the Jetson nano. Request for help

I had OpenCV 4.1.2 installed on my system with Cuda support and after installing OpenCV 4.8.0 (had to upgrade OpenCV because I needed to install MediaPipe 0.8) and running the command opencv_version I get 4.8.0 as the OpenCV version. But when I run python3 -c "import cv2; print(cv2.__version__)" or python3 -c "import cv2; print('OpenCV version:', str(cv2.__version__)); print(cv2.getBuildInformation())" it points to the older version and I get OpenCV version as 4.1.2 and it’s build details.

How do I make sure only 4.8.0 is used hereafter and not 4.1.2
After running the command python3 -c "import cv2; print('OpenCV version:', str(cv2.__version__)); print(cv2.getBuildInformation())" I need to see OpenCV version as 4.8.0 and not 4.1.2

Please refer to the image attached

How to make sure python3 uses OpenCV 4.8.0?

Kindly pls help.

Hi,

Please try to set the below global environment:

$ echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
$ echo 'export PYTHONPATH=/usr/local/lib/python3.6/site-packages/:$PYTHONPATH' >> ~/.bashrc
$ source ~/.bashrc

Thanks.

Thank you