problems with PyQt5-5.15.0 linux wheel

Steve Borho steve at borho.org
Mon Jun 29 16:19:15 BST 2020



> On Jun 29, 2020, at 7:41 AM, Kyle Altendorf <sda at fstab.net> wrote:
> 
> On 2020-06-28 23:56, Steve Borho wrote:
>>> On Jun 28, 2020, at 2:29 AM, Phil Thompson <phil at riverbankcomputing.com> wrote:
>>> On 28/06/2020 01:45, Steve Borho wrote:
>>>> Hello,
>>>> I’ve 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.
>>> 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’t 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=~/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.
> 
> On 20.04 with pyenv installed Python versions I just tried creating virtualenvs for each of 3.5, 3.6, 3.7, and 3.8, updating pip, setuptools, and wheel, and installing PyQt5 from PyPI.  I haven't yet found any interesting differences.  How are you installing?  Into your OS provided Python's?  With sudo?  (definitely don't)  With --user?  (horribleness is restricted to your user account, but still don't)  What versions of pip, setuptools, and wheel?  Lots of opportunities for difference here.
> 
> You are saying that the entire site-packages/PyQt5/Qt/plugin/ directory is completely missing on 16.04/3.5?

Yes, exactly.  But just now in trying to create a minimal set of repro instructions I see that it is not so simple.

Ignore this until I can find a proper repro.  I’m questioning my sanity, I swear this worked differently on Friday.

—
Steve Borho


More information about the PyQt mailing list