PYTHON 错误提示:ModuleNotFoundError: No module named 'cv2'

ModuleNotFoundError: No module named 'cv2'

解决方法:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-contrib-python

pip install opencv-python

pip install opencv-contrib-python

 

    cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
AttributeError: module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline'
    temp = cv2.imread(au)
AttributeError: module 'cv2' has no attribute 'imread'

解决方法:
1.pip uninstall opencv-python
2.pip uninstall opencv-contrib-python
3.pip install opencv-python install "opencv-python-headless<4.3
4.pip install opencv-python==4.5.4.60 --user

 

posted @ 2020-11-19 21:20  myrj  阅读(3600)  评论(0编辑  收藏  举报