sudo apt-get install python-opencv is installed on python2
sudo apt-get install python3-opencv is installed on python3
to sum up
Linux installs the python library, apt-get install python3-name is installed in python3, the version without 3 is installed in the python2 version, you need to pay attention