packages
packages copied to clipboard
Package issue: Pillow yields ImportError: cannot import name '_imaging'
Package name
pillow
Package version
8.3.2
PyPI URL
https://pypi.org/project/Pillow/
piwheels URL
https://www.piwheels.org/project/pillow/
Python version
- [ ] Python 3.5
- [ ] Python 3.7
- [X] Python 3.9
I am the maintainer
- [ ] Yes
More information
I'm building a Docker image based on python:3.9.6-slim-buster for the platform linux/arm/v6 to run on a Raspberry Pi Zero.
After adding --extra-index-url https://www.piwheels.org/simple to my requirements.txt I now get the following stack trace when trying to start the container:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/src/app/display/__main__.py", line 4, in <module>
from display.cli import cli
File "/usr/src/app/display/cli.py", line 10, in <module>
from display.display import Display
File "/usr/src/app/display/display.py", line 3, in <module>
from PIL import Image
File "/usr/src/app/.venv/lib/python3.9/site-packages/PIL/Image.py", line 114, in <module>
from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (/usr/src/app/.venv/lib/python3.9/site-packages/PIL/__init__.py)
However, when I inspect the image there is a file at the path /usr/src/app/.venv/lib/python3.9/site-packages/PIL/_imaging.cpython-39-arm-linux-gnueabihf.so