depthai: [BUG] Jetson Nano 4GB - depthai_demo.py error - qt.qpa.plugin: Could not load the Qt platform plugin "xcb"
Describe the bug Hey all, I’m hitting a wall! I’ve been troubleshooting this issue for 20-25 hours or so. When I install depthai using the instructions linked here for my Nvidia Jetson Nano 4GB and run the following code
python3 depthai_demo.py
I get the error / output below
khalid@khalidjetson:~/Luxonis/depthai$ python3 depthai_demo.py
Using depthai module from: /home/khalid/.local/lib/python3.10/site-packages/depthai.cpython-310-aarch64-linux-gnu.so
Depthai version installed: 2.21.2.0
Setting up demo...
Available devices:
[0] 18443010F1AA721200 [X_LINK_UNBOOTED]
USB Connection speed: UsbSpeed.SUPER
Downloading /home/khalid/.cache/blobconverter/mobilenet-ssd_openvino_2021.4_6shave.blob...
[==================================================]
Done
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/khalid/.local/lib/python3.10/site-packages/cv2/qt/plugins" even though it was found.
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)
I’ve also tried installing depthai manually using the doc linked here and I still get the same above error.
Minimal Reproducible Example
Append the MRE to the bug report, [instructions here] (https://docs.luxonis.com/en/latest/pages/support/#creating-minimal-reproducible-example) I’m SSHing from my macos system to my Jetson Nano 4GB kit. Then I’m following the Jetson Nano Luxinos guide linked here. I have JetPack 4.6.1 installed on my Jetson Nano. This means it comes with Python 3.6.1. I’ve updated to python 3.10.11 successfully, so that is not an issue.
khalid@khalidjetson:~/Luxonis/depthai$ python3 --version
Python 3.10.11
Expected behavior I’m expecting the depthai_demo.py script to run successfully without any errors.
Pipeline Graph
Please also provide a screenshot of your pipeline using the DepthAI Pipeline Graph.
I attempted to use pipeline_graph
. When I ran this, I received the error mentioned in the guide.
khalid@khalidjetson:~/Luxonis/depthai$ pipeline_graph "python3 depthai_demo.py"
Traceback (most recent call last):
File "/home/khalid/.local/bin/pipeline_graph", line 5, in <module>
from depthai_pipeline_graph.pipeline_graph import main
File "/home/khalid/.local/lib/python3.10/site-packages/depthai_pipeline_graph/pipeline_graph.py", line 7, in <module>
from Qt import QtWidgets, QtCore
File "/home/khalid/.local/lib/python3.10/site-packages/Qt.py", line 1938, in <module>
_install()
File "/home/khalid/.local/lib/python3.10/site-packages/Qt.py", line 1886, in _install
raise ImportError("No Qt binding were found.")
ImportError: No Qt binding were found.
Then I attempted to run pip install PySide2
per the guides recommendation, but I received the following error
khalid@khalidjetson:~/Luxonis/depthai$ pip install PySide2
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement PySide2 (from versions: none)
ERROR: No matching distribution found for PySide2
Attach system log
- Provide output of log_system_information.py
khalid@khalidjetson:~/Luxonis/depthai$ python3 log_system_information.py
{
"architecture": "64bit ELF",
"machine": "aarch64",
"platform": "Linux-4.9.337-tegra-aarch64-with-glibc2.27",
"processor": "aarch64",
"python_build": "main Jul 25 2023 19:48:07",
"python_compiler": "GCC 7.5.0",
"python_implementation": "CPython",
"python_version": "3.10.11",
"release": "4.9.337-tegra",
"system": "Linux",
"version": "#1 SMP PREEMPT Thu Jun 8 21:19:14 PDT 2023",
"win32_ver": "",
"packages": [
"blobconverter==1.4.2",
"boto3==1.28.11",
"botocore==1.31.11",
"certifi==2023.7.22",
"charset-normalizer==2.0.12",
"depthai==2.21.2.0",
"depthai-pipeline-graph @ git+https://github.com/luxonis/depthai_pipeline_graph.git@848a147009ffca578a85910ed298ab4430c67727",
"depthai-sdk==1.9.4",
"distinctipy==1.2.2",
"ffmpy3==0.2.4",
"idna==3.4",
"jmespath==1.0.1",
"lz4==4.3.2",
"marshmallow==3.17.0",
"mcap==1.1.0",
"mcap-ros1-support==0.0.8",
"numpy==1.25.1",
"opencv-contrib-python==4.5.5.62",
"packaging==23.1",
"pip==23.2.1",
"python-dateutil==2.8.2",
"pytube==15.0.0",
"PyTurboJPEG==1.6.4",
"pyusb==1.2.1",
"PyYAML==6.0.1",
"Qt.py==1.3.8",
"requests==2.26.0",
"rosbags==0.9.11",
"ruamel.yaml==0.17.32",
"ruamel.yaml.clib==0.2.7",
"s3transfer==0.6.1",
"scipy==1.11.1",
"sentry-sdk==1.5.1",
"setuptools==65.5.0",
"six==1.16.0",
"types-PySide2==5.15.2.1.5",
"urllib3==1.26.16",
"xmltodict==0.13.0",
"zstandard==0.21.0"
],
"usb": [
{
"port": 1,
"vendor_id": "0x0bda",
"product_id": "0x0411",
"speed": "Super"
},
{
"port": 0,
"vendor_id": "0x1d6b",
"product_id": "0x0003",
"speed": "Super"
},
{
"port": 4,
"vendor_id": "0x03e7",
"product_id": "0x2485",
"speed": "High"
},
{
"port": 2,
"vendor_id": "0x0bda",
"product_id": "0x5411",
"speed": "High"
},
{
"port": 0,
"vendor_id": "0x1d6b",
"product_id": "0x0002",
"speed": "High"
}
],
"uname": [
"Linux khalidjetson 4.9.337-tegra #1 SMP PREEMPT Thu Jun 8 21:19:14 PDT 2023 aarch64 aarch64"
]
}
System info gathered successfully - saved as "log_system_information.json"
Additional context I’ve tried many many different installation attempts, but each one seems to have the same exact error / outcome that I mentioned at the top of this ticket. Hoping someone can help!
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 25 (13 by maintainers)
Hi @roboticsmick , yea thats a good idea. @jakaskerl could you add a mention that it doesnt work on jetson nano in the guide
@zrezke Hey! I switched back to the Jetson Nano 4GB with the 20.04 Ubuntu image. I ran the following command from the documentation
sudo wget -qO- https://docs.luxonis.com/install_depthai.sh | bash
I was able to launch depthai successfully. When I tried launching depthai-viewer I received an error. I’m happy with this result. I know that depthai-viewer is in beta at the moment so that’s probably expected behavior for now.
Do you think this ticket is good to close out?
@zrezke Hey so I decided to order the Jetson Orin Nano 8GB, which recently received the Ubuntu 20.04 update along with JetPack 5.1.2 and Vulkan 1.3. I ran through all the installations steps. Then from the Ubuntu GUI session, I ran the following command and received the same error that I received on the Jetson Nano 4GB.
So at least we know that there WGPU error is somewhat consistent across the Jetson developer kits
@zrezke Thanks for posting the work around. In your earlier comment you mentioned the Oak D Lite is not supported by Ubuntu 18.04. I kept running into issues using 18.04 so I upgraded to 20.04. I was able to run the commands mentioned in your earlier comment. I did run into issues running the basic examples, so I’ll open a separate ticket for that.
In case anyone is working through this problem, here are my steps for installing Ubuntu 20.04. Fortunately, someone else created a Jetson Nano 4GB Ubuntu 20.04 image.
Micro USB OTG to USB 2.0 SD Card Adapter, COCOCKA Micro SD Card Reader,Trail Camera Memory Card Adapter Connector for Android Phone/Computer,Supports SD/SDHC/SCXC/MMC/MMC Micro
Run the following commands
sudo apt install curl
Install Rust using the command below
curl --proto '=https' --tlsv1.2 -sSf [https://sh.rustup.rs](https://sh.rustup.rs/) | sh
Install Depthai Viewer
git clone https://github.com/luxonis/depthai-viewer.git && cd depthai-viewer
sudo apt install cargo
sudo apt-get update
sudo apt-get -y install cargo
sudo apt update
sudo apt-get install gparted
sudo passwd root
sudo passwd -u root
su -
sudo gparted
./scripts/setup_dev.sh
cargo --version
prints 1.70 once you are donepython3 -m pip install rerun_py/
This installation ran successfully. However, I was unable to get the “minimal” example working mentioned here in the documentation. I will open a separate bug ticket for that.