Error trying to install PIL

I try to install PIL but I 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 
+6
source share
3 answers

Instead, you can use Pillow , which is a PIL fork:

 pip install Pillow 

To import, use:

 from PIL import Image 
+21
source

The PIL library is located in Pillow . Try the following:

 $ pip install Pillow 
+1
source

Not sure if there is a better way than this. But this may work as described in the documentation:

http://www.pythonware.com/products/pil/ .

Download the source kit and remove it. After removing, do the following as described in the kit.

  $ tar xvfz Imaging-1.1.7.tar.gz $ cd Imaging-1.1.7 $ python setup.py install 
0
source

Source: https://habr.com/ru/post/1013513/


All Articles