Today, there was an error when running opencv module attributeerror: module 'CV2. CV2' has no attribute 'face'
, CSDN checked and said that it was necessary to uninstall opencv first and then install it again. I felt that it was too troublesome, so I tried to find the answer in stackoverflow, which was effective. I specially recorded it
Opencv has two modules,
OpenCV_ contrib_ python
、opencv_ Python
let their twoversion numbers be the same
is OK.
If not, adjust the version number of the two modules at the same time and try again. Remember to be consistent
PIP install the specified version
pip install opencv_contrib_python == version
If this helps you, please click like to support it 😀