AttributeError: module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘

今天跑代码时,按照requirement.txt装上了albumentations==1.0.3,但是装完后就报错:

AttributeError: module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘

然后百度,降低openc-python的版本:

pip install opencv-python==4.1.2.30

但是装完后,又报错:

opencv-python——AttributeError: module ‘cv2‘ has no attribute ‘setNumThreads‘

我发现卸载opencv-python再重装后就可以了,但是又报错让我安装albumentations==1.0.3,然后我思考了一下:

1.先把环境中的opencv-python卸载

2.安装albumentations==1.0.3

3.重新安装opencv-python

4.success!!!

你可能感兴趣的:(软件安装问题,python,开发语言)