Unlike other python packages, the py38-qt5 package (and possibly the whole devel/py-qt5 port) doesn't install egg-info or any other indication of its existence. This causes parts of the python toolchain (such as pip) to not recognize it as a python package, causing numerous issues. The issue we to was that when installing a pip package dependent on PyQt5, pip insists that it compile and install PyQt5 because it cannot find it. Steps to reproduce: 1) Install the package with `pkg install py38-qt5` 2) Install pip with `pkg install py38-pip` 3) Try to install software depending on the PyQt5 package or the package itself with `pip install PyQt5` pip will now start installing build dependencies and try to build the package from source, instead of the expected output: "Requirement already satisfied: PyQt5 in /usr/local/lib/python3.8/site-packages (5.15.4)". Note: The binding is still likely usable in python scripts because the metaport also installs QtPy, which DOES specify PyQt5 as the top-level directory in its egg-info. However, this clearly isn't sufficient.
Using pip with/as root is an unsupported Python configuration as it can and does produce inconsistent site-packages environments, while we understand why people might use it. Is this issue also reproducible using pip in a virtualenv using --system-site-packages with py-qt5 installed (via pkg) ?
(In reply to Kubilay Kocak from comment #1) Yes, it is. Here is what I did: $ virtualenv --system-site-packages testenv Using base prefix '/usr/local' New python executable in /usr/home/jakubsebek/testenv/bin/python3.8 Also creating executable in /usr/home/jakubsebek/testenv/bin/python Installing setuptools, pip, wheel... done. $ source testenv/bin/activate (testenv) $ pip install pillow Requirement already satisfied: pillow in /usr/local/lib/python3.8/site-packages (8.2.0) (testenv) $ pip install PyQt5 Collecting PyQt5 Using cached PyQt5-5.15.4.tar.gz (3.3 MB) Installing build dependencies ... -^canceled You can see that pillow, which has been installed with `pkg install py38-pillow`, is found as expected. PyQt5, which has been installed with `pkg install py38-qt5`, isn't.
The problem seems to be solved: (testenv) % pip install PyQt5 Requirement already satisfied: PyQt5 in /usr/local/lib/python3.9/site-packages (5.15.10) Requirement already satisfied: PyQt5-sip<13,>=12.13 in /usr/local/lib/python3.9/site-packages (from PyQt5) (12.13.0)