Skip to content

Could not find the Qt platform plugin "wayland" in opencv path #729

Open
@likehengqq

Description

@likehengqq

Expected behaviour

Write here how did you expect the library to function.

Actual behaviour

Write here what went wrong.

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "/home/firefly/venv/lib/python3.9/site-packages/cv2/qt/plugins"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted (core dumped)

Steps to reproduce

  • example code
import cv2
cap=cv2.VideoCapture(8)
while True:
    ret,frame =cap.read()
    frame=cv2.flip(frame,1)
    cv2.imshow('frame',frame)
    if cv2.waitKey(1)&0xff==ord('q'):
        break
cap.release()
cv2.destroyAllWindows()
  • operating system: ubuntu 20.04
  • architecture (e.g. x86): aarch64
  • opencv-python version: opencv_python-4.5.1.48-cp39-cp39
Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • I'm using the latest version of opencv-python

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions