piwheels / packages

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

Illegal instruction when: from PIL import Image #269

Closed darton closed 2 years ago

darton commented 2 years ago

Package name

Pillow

Package version

9.0.0

PyPI URL

https://pypi.org/project/Pillow/

piwheels URL

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

Python version

I am the maintainer

More information

Importing Image or ImageDraw from Pillow results in "Illegal instruction" error

Platform: Raspbery Pi Zero W OS: Raspbian GNU/Linux 11 (bullseye) Python: Python 3.9.2 (default, Mar 12 2021, 04:06:34) Pillow: 9.0.0

from PIL import Image or from PIL import ImageDraw

result:

Illegal instruction

Sebwap commented 2 years ago

Same issue with others packages such as psutil, beautifulsoup4.

michaeltoohig commented 2 years ago

I have this issue with numpy and scipy as well.

For context, I can not get a fast internet connection and using pip install on the pi always results in a timeout error for packages over several MB. Doesn't matter if I set timeout for 60 minutes the timeout is always about 10 minutes so the issue is on server side / my side due to slow internet (around 10 kb/s). However, I am having success downloading the files with wget and wget handles reconnecting after the timeout and completes the download. Then, I use --find-links to point to a directory containing the whl files and after the installation I have the Illegal Instruction error when I import the package. I had thought the issue was because I was downloading the files outside of pip but given others have the same issue it may not be my unorthodox installation process.

bennuttall commented 2 years ago

It looks like this issue is present in all cp39 wheels built in the last few weeks. Something must have changed in gcc or something which is producing armv6l-incompatible wheels. We're looking into it. For now, try the previous version of a package, or use --no-binary :all:.

loiccoyle commented 2 years ago

I'm getting this for numpy>=1.21.5

To reproduce:

pip install numpy
python -c "import numpy"

Related issue: https://github.com/numpy/numpy/issues/20765

MichaIng commented 2 years ago

Same recognised here with psutil on armv6l RPi models, hence RPi 1 and Zero (1). Probably something on the CI/CD pipeline changed so that armv6l compatibility was lost, respectively an ARMv7-only build flag used somehow?

bennuttall commented 2 years ago

This issue has been identified and we hope to fix asap. Follow in #276

bennuttall commented 2 years ago

The wheels have been rebuilt and this issue should now be resolved

Sebwap commented 2 years ago

Yes it's ok now. Thx everyone !