Trying to do a simple UI (not a single button or text box), but my RPi says it can't find pyuic5
-
NOT a pip install (what is that, anyway?) on my RPi Zero with the latest image from RPi imager, but loaded tools with:
sudo apt install qttools5-dev-toolsThe command I'm attempting to use:
doug@PiTemp:~ $ pyuic5 -o temp_display.py ui/temp_display.ui
result:
bash: pyuic5: command not foundI DO have QT 5 Designer, so I would have thought ALL the tools would have gotten installed, but alas, no. Or at least not in a location my Pi knows to look for it. I don't know where it should be in Linux's arcane filesystem. I know, I know, it's not arcane to all of you! I'm a Windows guy trying to find my way in the Linux world where there appears to be about 50 different, incompatible ways to install any given software package or change a system configuration.
-
NOT a pip install (what is that, anyway?) on my RPi Zero with the latest image from RPi imager, but loaded tools with:
sudo apt install qttools5-dev-toolsThe command I'm attempting to use:
doug@PiTemp:~ $ pyuic5 -o temp_display.py ui/temp_display.ui
result:
bash: pyuic5: command not foundI DO have QT 5 Designer, so I would have thought ALL the tools would have gotten installed, but alas, no. Or at least not in a location my Pi knows to look for it. I don't know where it should be in Linux's arcane filesystem. I know, I know, it's not arcane to all of you! I'm a Windows guy trying to find my way in the Linux world where there appears to be about 50 different, incompatible ways to install any given software package or change a system configuration.
@scubabeme
pyuic5
is a part of PyQt5, a third-party offering to integrate Qt with Python from Riverbank. It has nothing to do with standard Qt distribution, and would not come withapt install qttools5-dev-tools
.You will need to start by installing PyQt5. I don't think you have done that yet. Depending on your version & distro of Linux (I don't use RPi) you may be able to do that via
apt
withsudo apt install python3-pyqt5
. Alternativelypip
, which is Python's own package installation handler, may be used viapip3 install pyqt5
. Note that usespip3
rather than plainpip
: I do not know whether both of them work. I believe either of those will bringpyuic5
with it, if notpip install pyqt5-tools
. If you want further information for RPi Googlerpi install pyqt5
.Be aware:
-
The current version of Qt is now Qt6. You are trying to install Qt5. You might be better off with Qt6, for which PyQt6 is available. Google
rpi install pyqt6
for that. -
PyQt comes from a third-party and has GPL instead of LGPL licensing. That puts more restrictions on you if you wish to release software you write. The Qt Company has its own offering of Python bindings for Qt, named PySide. For Qt5 that was PySide2, and I would say PyQt5 was better (if you don't mind the licensing). But certainly if you go Qt6 I would recommend the corresponding PySide6 over PyQt6. Again Google
rpi install pyside6
if you want to investigate that: it may be this is still not available for RPi, I don't know.
-
-