<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Debian likes to split an application into multiple packages</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><a href="https://packages.debian.org/bookworm/all/pyqt6-dev-tools/filelist">https://packages.debian.org/bookworm/all/pyqt6-dev-tools/filelist</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 25, 2024 at 11:22 AM Colin Macdonald <<a href="mailto:cbm@math.ubc.ca">cbm@math.ubc.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I've been using "from PyQt6 import uic" and this works just fine with <br>
your libraries from `pip install pyqt6`.<br>
<br>
But I've just found that this does not work out-of-the-box on Debian <br>
12.8 and Ubuntu 24.04.<br>
<br>
For example:<br>
<br>
$ docker pull debian:trixie<br>
$ docker run -it --rm debian:trixie<br>
$ apt update<br>
$ apt install python3-pyqt6<br>
$ python3 -c "from PyQt6 import uic"<br>
Traceback (most recent call last):<br>
   File "<string>", line 1, in <module><br>
ImportError: cannot import name 'uic' from 'PyQt6' <br>
(/usr/lib/python3/dist-packages/PyQt6/__init__.py)<br>
<br>
- - - -<br>
<br>
My real code looks something like this:<br>
<br>
from PyQt6 import uic<br>
<br>
class XYZ(QDialog):<br>
     def __init__(self):<br>
         super().__init__()<br>
         uic.loadUi("xyz.ui", self)<br>
<br>
Perhaps that isn't quite right?  I don't recall where I learned this, <br>
perhaps <a href="https://www.pythonguis.com/tutorials/pyqt6-first-steps-qt-designer/" rel="noreferrer" target="_blank">https://www.pythonguis.com/tutorials/pyqt6-first-steps-qt-designer/</a><br>
<br>
Maybe I should go back to `pyuic6` approach instead?<br>
<br>
Or is this something to file an issue with the Debian folks?<br>
<br>
thanks,<br>
Colin<br>
<br>
-- <br>
Colin Macdonald<br>
Associate Professor<br>
Dept of Math, UBC<br>
<br>
</blockquote></div>