0

When I import Image from PIL I get this error message.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/.local/lib/python3.8/site-packages/PIL/Image.py", line 94, in <module>
    from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (/home/pi/.local/lib/python3.8/site-packages/PIL/__init__.py)

The way it says to install pillow errors out for me

pip install --upgrade Pillow

It says that it doesn't have the .whl so it defaults to the old setup.py then errors and doesn't install.

only

sudo apt install python3-pil

seems to install pillow correctly

this is for python3.8.x

Euro
  • 1

1 Answers1

0

Try using pip3 instead of pip. pip sometimes defaults to Python 2.x. See the following question to change this behavior: How to override the pip command to Python3.x instead of Python2.7?

pip3 install --upgrade Pillow
zmike
  • 1,090
  • 10
  • 24