2

I got a problem with importing Pillow.

ImportError: cannot import name '_imaging' from 'PIL'

Import way:

from PIL import Image

PIL installation: pip install Pillow

  1. I hasnt try to install Pillow over a PIL installation (default problem i think, after Internet research)
  2. I have already reinstalled it with PIP.
  3. All other imports working correctly

Have a nice day!

gsamaras
  • 71,951
  • 46
  • 188
  • 305
Kamajiu
  • 43
  • 4

1 Answers1

0

Pillow docs mention:

Pillow >= 2.1.0 no longer supports import _imaging. Please use from PIL.Image import core as _imaging instead.

Did you try that?


Another attempt:

pip install -U Pillow

Read more in ImportError: cannot import name _imaging.

PS: PIL is deprecated - Pillow is its replacement.

gsamaras
  • 71,951
  • 46
  • 188
  • 305
  • Pillow is installed. Module is found but importing not working. If I try to install it: requirements alredy satisfied. – Kamajiu Jan 14 '22 at 14:20
  • @Kamajiu did you try my updated answer `pip install -U Pillow`? – gsamaras Jan 14 '22 at 14:21
  • Yes, should have the latest version – Kamajiu Jan 14 '22 at 14:24
  • @Kamajiu I see, thank you. Did you read the link in my answer? In the comments they say "pip uninstall pillow pip install pillow was enough". Did you try that? Did you try the deprecation notice in my updated answer? – gsamaras Jan 14 '22 at 14:26
  • I read your link carefully. Reinstallation is not working for me either try to import Image solo. I also havent copy it from another System. Tryed from PIL.Image import core as _imaging , raise same error. – Kamajiu Jan 14 '22 at 14:33