Re-run previously entered command as root user.
python
sudo !!
!!is automatically substituted to the content of the previous command. Turning the above line intosudo <your command here>.
Create GUI Applications with Python & Qt6 by Martin Fitzpatrick
(PyQt6 Edition) The hands-on guide to making apps with Python — Save time and build better with this book. Over 15K copies sold.