Re: problems with PyQt5-5.15.0 linux wheel

Steve Borho <[email protected]> Sun, 28 Jun 2020 22:56:24 -0500
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>

> On Jun 28, 2020, at 2:29 AM, Phil Thompson =
<[email protected]> wrote:
>=20
> On 28/06/2020 01:45, Steve Borho wrote:
>> Hello,
>> I=E2=80=99ve noticed something unusual about the
>> PyQt5-5.15.0-5.15.0-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl
>> wheel that is served by PyPi.
>> If you install it on Ubuntu 20.04 (py3.8) or Ubuntu 18.04(py3.6) it
>> seems to be ok, but if you install it on Ubuntu 16.04 (py3.5) it does
>> not install the Qt/plugin/ or Qt/translations/ folder like it does =
for
>> the other Python versions.
>> This leads to runtime errors when you try to use PyQt5:
>> qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even
>> though it was found.
>> This application failed to start because no Qt platform plugin could
>> be initialized. Reinstalling the application may fix this problem.
>> I checked the PyQt5-5.14.2 wheel on Ubuntu 16.04 (py3.5) and it did
>> install the plugins and translations, so this looks like a =
regression.
>=20
> I think Qt v5.15.0 no longer includes its own copy of the xcb =
libraries so they have to be installed by the OS.

I don=E2=80=99t think it is a Qt change, I think it is PyQt related for =
three reasons:

1. On the Python3.5 machines (16.04) we can work around the problem by =
pointing an env var at any local copy of Qt-5.15, so the required files =
are in the Qt distribution.

QT_QPA_PLATFORM_PLUGIN_PATH=3D~/Qt/5.15.0/gcc_64/plugins

2. If we install the same wheel on a Python3.6 or Python3.7 system, it =
installs these plugins into site-pacakges/PyQt5/Qt/lib/plugins and the =
workaround is unnecessary

3. If you manually run sip-install on PyQt-5.15.0 building against =
Qt-5.15.0 with Python3.5, the same thing happens, the plugins are not =
copied into site-pacakges.  But it works fine on Python3.6.

Regards,

Steve Borho=