Problems with PyQt5 on Raspi 5 / Debian Bookworm

ullix ullix at urkam.de
Mon Dec 18 07:40:17 GMT 2023


Am 15.12.23 um 17:34 schrieb Phil Thompson:
> On 15/12/2023 16:23, ullix wrote:
>> I got the new Raspi 5 and tested a few things. I used pip to
>> install/modify a dozen packages, and all worked except for *PyQt5.*
>>
>> PyQt5 had been apt-installed as version 5.15.9, and worked in tests of
>> mine. But what failed was when trying to upgrade to 5.15.10. After
>> closer instepction I apt-removed the apt-installed PyQt5, and tried to
>> pip-install that very same version. It failed with :
>>
>>   Preparing metadata (pyproject.toml): started
>>   Preparing metadata (pyproject.toml): finished with status 'error'
>>
>> Full error report in attached file.
>>
>> After reinstalling 'python3-pyqt5' via apt, it worked again.
>>
>> Where is the problem: Raspi, Debian, pip, pyqt5?
>>
>> ullix
>>
>>
>> On Raspi 5 I used the default OS install:
>>
>>
>>      Raspberry Pi OS with desktop
>>
>>  * Release date: December 5th 2023
>>  * System: 64-bit
>>  * Kernel version: 6.1
>>  * Debian version: 12 (bookworm)
>
> pip is attempting to build from source and needs extra options to be 
> specified. You also need a reasonably up to date pip. It's much easier 
> to use pip to install sip and PyQt-builder and download the sdist, 
> then run sip-install in the untarred sdist.
>
> Phil


Thanks, but I don't understand what the consequences of your statement 
are. I also believe the problem indicates a broader problem.

Debian 12 (bookworm), the basis for the current Raspberry Pi OS, is 
drawing its conclusions from the success of Python and are now blocking 
the possibility of changing the Python installation of the OS by pip. (I 
know you can break this by deleting file file 'EXTERNALLY-MANAGED' of 
pip-install with flag '--break-system-files', but this is defeating the 
purpose of this blocking).

They now direct everyone towards a venv install. This works, though it 
requires extra steps.

However, for a clean venv you now need to install e.g. PyQt5, and this 
fails, as outlined above. Is this a bug? Is this a flaw introduced by 
the Raspi packagers? Or is this a introduced by Debian packagers, which 
means it will soon become a broader problem?

Can you say what packages need to be installed to make installation of 
PyQt5 possible? Or is this a much deeper problem?

ullix





More information about the PyQt mailing list