piwheels / packages

Issue tracker for piwheels package issues
https://github.com/piwheels/packages/issues
20 stars 5 forks source link

Problem with package: Pillow #345

Open MichaIng opened 1 year ago

MichaIng commented 1 year ago

Package name

pillow

Package version

all

PyPI URL

https://pypi.org/project/pillow/

piwheels URL

https://www.piwheels.org/project/pillow/

Python version

I am the maintainer

More information

The dependencies are wrong. Installed need to be:

sudo apt install libtiff5 libopenjp2-7 libxcb1

libtiff5 pulls libjpeg62-turbo in, which is the first loaded non-essential shared library, and also libwebp6 for webp support and others.

This was tested (verified by installing nothing at first) on a fresh Bullseye system, but we have this very set of packages working for Pillow-dependants since a long time for Buster and Bullseye.

bennuttall commented 1 year ago

@waveform80 any ideas?

bellini666 commented 1 year ago

Btw, not sure if it is related to this issue (if not, I'll open a new one), but Pillow 9.5.0 is having issues on buster (not sure if bullseye would be affected as well)

Here is the issue I opened upstream with details: https://github.com/python-pillow/Pillow/issues/7067

MichaIng commented 1 year ago

Here is the commit which implemented the use of the OpenJPEG function mentioned in your issue: https://github.com/python-pillow/Pillow/commit/de43bc99c873fe0c752f5e303c4a40f954b61912

So yes, on Buster, Pillow 9.4.x is the last functional version. How can pip actually be told (server-side) to not pick 9.5.x sources but 9.4.x? Usually, if no version is requested explicitly and there is no wheel for the latest version, it pulls latest sources and tries to compile it, instead. But I know from other wheels/modules where pip does not pull the latest sources but a specific older subversion, so there seems to be some flag?

bennuttall commented 1 year ago
root@piwheels30:~# apt install libtiff5 libopenjp2-7 libxcb1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libopenjp2-7 is already the newest version (2.4.0-3).
libopenjp2-7 set to manually installed.
libtiff5 is already the newest version (4.2.0-1+deb11u4).
libtiff5 set to manually installed.
libxcb1 is already the newest version (1.14-3).
libxcb1 set to manually installed.
MichaIng commented 1 year ago

To test:

apt -y autopurge libtiff5 libxcb1
apt -y install libwebpdemux2 libopenjp2-7 libwebpmux3 liblcms2-2
pip3 install pillow
# Then try to use the module, which should fail
apt -y autopurge libwebpdemux2 libwebpmux3 liblcms2-2
apt -y install libtiff5 libxcb1
# Try again to use the module, which should now succeed