I am running Python 3.12.4 in a virtual environment under Ubuntu 24.04. Pillow installed without warnings using th command: python -m pip install pillow
.
However a script:
from PIL import Image
fails in the following way:
>>> from PIL import Image
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/mnt/SystemData/venvs/PRD/lib/python3.12/site-packages/PIL/Image.py", line 100, in <module>
from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (/mnt/SystemData/venvs/PRD/lib/python3.12/site-packages/PIL/__init__.py)
After Googling it appears that my problem may be that the C language module _image.so
is not installed. What is the best way to correct this problem?