解决使cv2的时候module ‘cv2‘ has no attribute ‘imread‘错误

最近在做项目的时候用到了cv2读取图片,运行程序的时候遇到了如下的报错

input_img = cv.imread(file_path)
AttributeError: module 'cv2' has no attribute 'imread'

我已经安装了opencv-python3=1.0

目前的解决办法是安装

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

你可能感兴趣的:(开发所遇问题,opencv,计算机视觉,深度学习)