Skip to content

AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import) #749

@aruiplex

Description

@aruiplex

Expected behaviour

cv2 could be successfully imported.

Actual behaviour

After I install the opencv-python or opencv-python-headless, I import cv2, it will raise a exception:

AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)

Steps to reproduce

OS: ubuntu22.04 in docker.
opencv-version: 4.6.0.66

Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)

P.S.: I can solve this issue using the answer. I use the version 4.5.5.62, everything will be ok. However, that is the problem, I do not know why the new version will cause the error.

Thank you.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions