Get error when try to install PIL

Shira picture Shira · Dec 26, 2016 · Viewed 75k times · Source

I try to install PIL but get errors, what should I do?

$ Command
Result
------------
$ pip install PIL

Collecting PIL
  Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL
--------------------------------------------------------------------
$ pip install PIL  --allow-unverified PIL --allow-all-external

DEPRECATION: --allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
DEPRECATION: --allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
Collecting PIL
  Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL

Answer

maviz picture maviz · Dec 26, 2016

You could try using Pillow instead, which is a PIL fork:

pip install Pillow

To import use:

from PIL import Image