Conflicting opencv version in Jetson Nano Orin

Hello,

I am trying to use OpenCV in my application and I am seeing this version conflict.

mannan@ubuntu:/opt/ros/noetic/lib/mavros$ python3 -c "import cv2; print(cv2.__version__)"
4.2.0
mannan@ubuntu:/opt/ros/noetic/lib/mavros$ python -c "import cv2; print(cv2.__version__)"
4.5.4

I tried the solution given in nvidia forum here which is simply running the following command:


$ 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

I modified the aforementioned command for Jetson Nano Orin (SDK 5.1.3) having Python version 3.8.10 as follows:

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

However, I am still getting the same output of when I print OpenCV version for Python and Python3. Could you please advise? I am using Jetson Nano Orin and my SDK version is 5.1.3. Thank you so much for your kind response.

Hi,
Please try this script to manually install OpenCV:

JEP/script/install_opencv4.6.0_Jetson.sh at master · AastaNV/JEP · GitHub

There is an option to remove already-installed OpenCV. You may do it to have a clean environment.

Hello DaneLLL,

Thank you so much for your response. It worked. Really grateful to you for your help.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.