Uninstall OpenCV 4.1.1 and install OpenCV 4.5

Hello everyone,

I have jetpack 4.6 on my Jetson NX. And I am developing object detection model using YOLOv3. As far as I know, OpenCV 4.1.1 not support “DNN_BACKEND_CUDA”. Thats why I want to remove default OpenCV 4.1.1 and install 4.5.

I tried to uninstall using sudo sudo apt-get purge *libopencv* command, it looks like uninstalled but not. I check with import cv2 command and still importing. Also I checked the version using cv2.__version__ command and it printing the version ‘4.1.1’.

So, how can I remove default OpenCV 4.1.1?


Thank you for your answer, but I was not install opencv using pip. That’s why it’s not a solution for me.

Can anyone help me to solve this problem?

Hi @alprblmmcu ,

Just to confirm could you please try to run the following command and check if you continue having OpenCV 4.1.1 in the system.

sudo apt purge libopencv-dev libopencv-python libopencv-samples libopencv*

best regards,
Mauricio Montero J.

1 Like

Thank you for your answer @mauricio.montero.

That command not worked for me either. I solved the problem actually. But unfortunately I did it manually.

sudo find / -name " *opencv* " -exec rm -i {} \;
with above command, I find the opencv related folders and files, and remove them.

After removing process, I checked the version using following command if opencv still exist.
pkg-config --modversion opencv

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