2016-12-26 4 views
6

Ich versuche PIL zu installieren, bekomme aber Fehler, was soll ich tun?Fehler beim Versuch, PIL zu installieren

$ 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

welches System? Auf Linux Mint können Sie 'apt-get' verwenden, um' python-pil' oder 'python-pillow' zu installieren. – furas

Antwort

18

könnten Sie versuchen Pillow stattdessen verwenden, die eine PIL Gabel:

pip install Pillow 

Gebrauch zu importieren:

from PIL import Image 
+0

Es funktioniert! Vielen Dank! – Shira

0

Nicht sicher, ob es einen besseren Weg als diesen gibt. Dies funktioniert jedoch wie in der Dokumentation beschrieben:

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

Laden Sie das Quellkit herunter und extrahieren Sie es. Führen Sie nach der Extraktion die folgenden Schritte durch, wie im Kit beschrieben.

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

In der Datei enthalten von _imagingtk.c: 19: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX .platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/tk.h: 78: 11: fatal error: 'X11/Xlib.h' Datei nicht gefunden #include ^ 1 Fehler erzeugt. Fehler: Befehl 'cc' fehlgeschlagen mit Exit-Status 1 – Shira

+0

Sehen Sie, wenn eine der Lösungen hier das Problem löst. http://stackoverflow.com/questions/11465258/xlib-h-not-found-when-building-graphviz-on-mac-os-x-10-8-mountain-lion –

0

Die Bibliothek PIL in Pillow ist. Versuchen Sie dies:

$ pip install Pillow 
Verwandte Themen