When trying to run "depthai_demo.py" after a fresh install on Ubuntu 22.04 I get the following error

python3 depthai_demo.py
Using depthai module from: /home/khadas/Downloads/depthai/myvenv/lib/python3.10/site-packages/depthai.cpython-310-aarch64-linux-gnu.so
Depthai version installed: 2.17.3.0
Setting up demo...
Available devices:
[0] 184430100114CA0F00 [X_LINK_UNBOOTED]
USB Connection speed: UsbSpeed.HIGH
Enabling low-bandwidth mode due to low USB speed... (speed: UsbSpeed.HIGH)
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 "offscreen" in "/home/khadas/Downloads/depthai/myvenv/lib/python3.10/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

Any thoughts?

  • erik replied to this.

    Hi TDurham ,
    Have you installed the requirements? What's your opencv version?
    Thanks, Erik

    Yes, all requirements have been installed as far as I know. Have successfully built and installed ROS2 and OpenCV and they both run fine. OpenCV version is 4.5.4. I think it may be a permissions issue. I have QtCreator installed and get the same error when I run it. But, if I launch it as sudo it runs just fine.

    • erik replied to this.

      TDurham It looks like it's an opencv + QT issue (not related to depthai). Maybe check stackvoerflow, like this solution.
      THanks, Erik