albumentations
albumentations copied to clipboard
AttributeError: module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline'
🐛 Bug
Google Colab is not compatible with latest version of Albumentations.
To Reproduce
Open any Colab notebook and then:
%pip install -U albumentations
import albumentations as A
Output:
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Requirement already satisfied: albumentations in /usr/local/lib/python3.7/dist-packages (0.1.12)
Collecting albumentations
Downloading albumentations-1.2.0-py3-none-any.whl (113 kB)
|████████████████████████████████| 113 kB 14.5 MB/s
Requirement already satisfied: PyYAML in /usr/local/lib/python3.7/dist-packages (from albumentations) (3.13)
Requirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from albumentations) (1.4.1)
Requirement already satisfied: scikit-image<0.19,>=0.16.1 in /usr/local/lib/python3.7/dist-packages (from albumentations) (0.18.3)
Collecting opencv-python-headless>=4.1.1
Downloading opencv_python_headless-4.6.0.66-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (48.3 MB)
|████████████████████████████████| 48.3 MB 1.1 MB/s
Collecting qudida>=0.0.4
Downloading qudida-0.0.4-py3-none-any.whl (3.5 kB)
Requirement already satisfied: numpy>=1.11.1 in /usr/local/lib/python3.7/dist-packages (from albumentations) (1.21.6)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from qudida>=0.0.4->albumentations) (4.1.1)
Requirement already satisfied: scikit-learn>=0.19.1 in /usr/local/lib/python3.7/dist-packages (from qudida>=0.0.4->albumentations) (1.0.2)
Requirement already satisfied: PyWavelets>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from scikit-image<0.19,>=0.16.1->albumentations) (1.3.0)
Requirement already satisfied: networkx>=2.0 in /usr/local/lib/python3.7/dist-packages (from scikit-image<0.19,>=0.16.1->albumentations) (2.6.3)
Requirement already satisfied: pillow!=7.1.0,!=7.1.1,>=4.3.0 in /usr/local/lib/python3.7/dist-packages (from scikit-image<0.19,>=0.16.1->albumentations) (7.1.2)
Requirement already satisfied: matplotlib!=3.0.0,>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from scikit-image<0.19,>=0.16.1->albumentations) (3.2.2)
Requirement already satisfied: tifffile>=2019.7.26 in /usr/local/lib/python3.7/dist-packages (from scikit-image<0.19,>=0.16.1->albumentations) (2021.11.2)
Requirement already satisfied: imageio>=2.3.0 in /usr/local/lib/python3.7/dist-packages (from scikit-image<0.19,>=0.16.1->albumentations) (2.4.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image<0.19,>=0.16.1->albumentations) (0.11.0)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image<0.19,>=0.16.1->albumentations) (2.8.2)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image<0.19,>=0.16.1->albumentations) (3.0.9)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image<0.19,>=0.16.1->albumentations) (1.4.3)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.1->matplotlib!=3.0.0,>=2.0.0->scikit-image<0.19,>=0.16.1->albumentations) (1.15.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.19.1->qudida>=0.0.4->albumentations) (3.1.0)
Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.19.1->qudida>=0.0.4->albumentations) (1.1.0)
Installing collected packages: opencv-python-headless, qudida, albumentations
Attempting uninstall: albumentations
Found existing installation: albumentations 0.1.12
Uninstalling albumentations-0.1.12:
Successfully uninstalled albumentations-0.1.12
Successfully installed albumentations-1.2.0 opencv-python-headless-4.6.0.66 qudida-0.0.4
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-1-902dd910d7b1>](https://localhost:8080/#) in <module>()
1 get_ipython().magic('pip install -U albumentations')
----> 2 import albumentations as A
15 frames
[/usr/local/lib/python3.7/dist-packages/cv2/gapi/__init__.py](https://localhost:8080/#) in <module>()
288
289
--> 290 cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
AttributeError: module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline'
Environment
Base Google Colab notebook https://colab.research.google.com/
Additional context
![Screen Shot 2022-06-26 at 8 30 00 PM](https://user-images.githubusercontent.com/26833433/175828957-4cae13b7-ecae-4df8-979f-0f3a7e342601.png)
CC @AyushExel
try again after you run the command below
pip install "opencv-python-headless<4.3"