How to prevent `opencv` from being upgraded by `pip install`?


Jetson nano comes with default opencv installation of version 4.1.1 (I guess all jetpack 4.6 boards like Xavier also has it), but during my pip installation, some library is depending on opencv and pip will then try to install opencv.

In my case, pip will always find a newer version of opencv and tries to upgrade it, to my point of view, override the default v4.1.1.

I have 2 qestions:

  1. Is the default opencv v4.1.1 a special build from nVidia and contains some nVidia specific building component? or is it just a ordinary build like opencv-python · PyPI ? is it safe to upgrade it along with other package’s installation?

  2. If I want to keep the version of v4.1.1 and prevent it from being upgraded by pip, how should I do it?

Please try this and check if it helps:
Jetson/L4T/TRT Customized Example -

it provides 2 solutions, one of which is to just * Upgrade python-opencv

May I confirm that on Jetpack, the updated opencv version works fine?

I gave up and am trying to build opencv from souce code, see

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