PIL

2016-12-26 44 views
6

'u yüklemeye çalışırken hatayla karşılaştım PIL yüklemeye çalışıyorum ancak hata alıyorum ne yapmalıyım?PIL

$ 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 
+0

Hangi sistemde? Linux Nint'te 'python-pil 'veya' python-pillow 'ya da' python-pillow 'yüklemek için apt-get'i kullanabilirsiniz. – furas

cevap

18

Bir PIL çatal olan yerine Pillow kullanarak deneyebilirsiniz:

pip install Pillow 

kullanımını aktarmak için:

from PIL import Image 
+0

İşe yarıyor! Teşekkür ederim! – Shira

0

Bundan daha iyi bir yol olup olmadığından emin değilsiniz. Ancak bu, şu belgede açıklandığı gibi çalışabilir:

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

Kaynak kitini indirin ve ayıklayın. Ayıklandıktan sonra, kitte açıklandığı gibi aşağıdakileri yapın.

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

_imagingtk.c dosyasındaki dosyada: 19: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX .platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/tk.h: 78: 11: önemli hata: 'X11/Xlib.h' dosya bulunamadı # dahil ^ 1 hata üretildi. hata: 'cc' komutu, çıkış durumu 1 – Shira

+0

ile başarısız oldu. Çözümlerden herhangi birinin sorunu çözüp çözmediğine bakın. http://stackoverflow.com/questions/11465258/xlib-h-not-found-when-building-graphviz-on-mac-os-x-10-8-mountain-lion –

0

kütüphane PILPillow içindedir. Bunu deneyin:

$ pip install Pillow