ChatGPT offers this setup guide:
Dependencies & Setup Guide for memgraph-widget.py
Tested on: Raspberry Pi OS Trixie (64-bit) with Wayland or X11.
Install system dependencies
python3-full provides headers, pip, and venv;
libxcb-cursor0 prevents the Qt “xcb plugin” error.
Create and activate a Python virtual environment
Install required Python packages inside the venv
This downloads Qt for Python (Pyside 6.x) and the system-statistics library psutil.
Save the script and make it executable
Run it (as normal user, not root)
Right-click the window to close it.
(Optional) Add to Autostart
It will appear automatically each time you log in.
Troubleshooting Notes
SymptomLikely CauseFix
ModuleNotFoundError: No module named 'PySide6'The virtual environment isn’t active.Run before launching.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb"Missing libxcb-cursor0..
Window does not appear when run as rootWayland/X11 security: root has no display.Always run as your normal desktop user.
Script won’t start on bootAutostart file path incorrect or not executable.Verify and the .desktop entry.
Dependencies & Setup Guide for memgraph-widget.py
Tested on: Raspberry Pi OS Trixie (64-bit) with Wayland or X11.
Code:
sudo apt updatesudo apt install -y python3-full python3-venv python3-psutil libxcb-cursor0python3-full provides headers, pip, and venv;
libxcb-cursor0 prevents the Qt “xcb plugin” error.
Code:
python3 -m venv ~/memgraph-venvsource ~/memgraph-venv/bin/activateCode:
pip install PySide6 psutilThis downloads Qt for Python (Pyside 6.x) and the system-statistics library psutil.
Code:
nano ~/memgraph-widget.py # paste Larry’s codechmod +x ~/memgraph-widget.pyCode:
~/memgraph-widget.py &Right-click the window to close it.
Code:
mkdir -p ~/.config/autostartcat > ~/.config/autostart/memgraph-widget.desktop <<'EOF'[Desktop Entry]Type=ApplicationExec=/home/$USER/memgraph-widget.pyHidden=falseNoDisplay=falseX-GNOME-Autostart-enabled=trueName=Memory Graph WidgetComment=Displays live memory usage graphEOFIt will appear automatically each time you log in.
SymptomLikely CauseFix
ModuleNotFoundError: No module named 'PySide6'The virtual environment isn’t active.Run
Code:
source ~/memgraph-venv/bin/activateqt.qpa.plugin: Could not load the Qt platform plugin "xcb"Missing libxcb-cursor0.
Code:
sudo apt install libxcb-cursor0Window does not appear when run as rootWayland/X11 security: root has no display.Always run as your normal desktop user.
Script won’t start on bootAutostart file path incorrect or not executable.Verify
Code:
chmod +x ~/memgraph-widget.pyStatistics: Posted by LDighera — Tue Oct 28, 2025 6:57 pm