2016-12-26 5 views
6

PIL을 설치하려고하는데 오류가 발생합니다. 어떻게해야합니까?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

어떤 시스템입니까? 리눅스 민트에서는'apt-get'을 사용하여'python-pil' 또는'python-pillow'을 설치할 수 있습니다 – furas

답변

18

당신은 PIL 포크 인 대신 Pillow를 사용하여 시도 할 수 :

pip install Pillow 

사용을 가져 오려면 :

from PIL import Image 
+0

작동합니다! 고맙습니다! – Shira

0

이보다 나은 방법이 있는지 확실하지 않습니다. 그러나이 설명서에 설명 된대로 작동 할 수 있습니다.

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

소스 키트를 다운로드하고 압축을 풉니 다. 추출한 후에는 키트에 설명 된대로 다음을 수행하십시오.

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

_imagingtk.c : 19 : /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX .platform/개발자/SDK를/MacOSX10.11.sdk은/usr// tk.h을 포함한다 : 78 : 11 : 심각한 오류가 발견되지는 않음 'X11/Xlib.h'파일 # 생성 ^ 1 에러를 포함한다. 오류 : 종료 상태 1로 'cc'명령이 실패했습니다. – Shira

+0

여기에서 해결 방법 중 하나가 문제를 해결하는지 확인하십시오. http://stackoverflow.com/questions/11465258/xlib-h-not-found-when-building-graphviz-on-mac-os-x-10-8-mountain-lion –

0

도서관 PILPillow입니다. 사용해보기 :

$ pip install Pillow