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 😀
Read More:
- Error reporting: attributeerror: module ‘******* has no attribute’ ******* and other problems are solved
- AttributeError: module ‘keras.backend‘ has no attribute ‘eager‘
- [error] attributeerror: module ‘SIP’ has no attribute ‘setapi‘
- AttributeError: module ‘os’ has no attribute ‘mknod’
- AttributeError:module“seaborn” has no attribute “lineplot”
- Attributeerror: ‘module’ object has no attribute ‘handlers’ — Python sub module import problem
- AttributeError: module ‘pkg_resources‘ has no attribute ‘declare_namespace‘
- Attributeerror: module “Seaborn” has no attribute “lineplot”
- AttributeError: module ‘torch’ has no attribute’_six’ [The problem is solved after restart]
- AttributeError:module ‘seaborn‘ has no attribute ‘tsplot‘
- Solving attributeerror: module ‘Matplotlib’ has no attribute ‘artist’
- AttributeError: module ‘onnxruntime‘ has no attribute ‘InferenceSession‘
- Attributeerror: the solution of module ‘urllib’ has no attribute ‘quote’
- AttributeError: module ‘numpy‘ has no attribute ‘getbuffer‘
- AttributeError: module…ops‘ has no attribute ‘_TensorLike‘, ValueError: `updates` argument..eager
- AttributeError: module ‘scipy.misc’ has no attribute ‘imread’
- Solving attributeerror: module ‘urllib’ has no attribute ‘request’
- AttributeError: module ‘onnxruntime‘ has no attribute ‘InferenceSession‘
- AttributeError: module ‘sacrebleu‘ has no attribute ‘compute_bleu‘
- AttributeError: module ‘os‘ has no attribute ‘fork‘