无法在python2.7中安装枕头

时间:2017-09-15 13:27:42

标签: python pillow

我尝试在python 2.7中安装枕头,但它显示以下错误

   Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0ffab30f90>, 'Connection to 192.168.5.254 timed out. (connect timeout=15)')': /simple/pil/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0ffab30f10>, 'Connection to 192.168.5.254 timed out. (connect timeout=15)')': /simple/pil/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0ffab30e10>, 'Connection to 192.168.5.254 timed out. (connect timeout=15)')': /simple/pil/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0ffab30090>, 'Connection to 192.168.5.254 timed out. (connect timeout=15)')': /simple/pil/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0ffaab7050>, 'Connection to 192.168.5.254 timed out. (connect timeout=15)')': /simple/pil/
  Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL

1 个答案:

答案 0 :(得分:0)

下载并安装Pillow for Python 2

https://pypi.python.org/packages/2.7/P/Pillow/Pillow-2.5.3.win-amd64-py2.7.exe#md5=33c3a581ff1538b4f79b4651084090c8

从Github下载cImage.py

Navigate to https://github.com/bnmnetp/cImage
Click cImage.py, and click the button labeled Raw to see the contents of the file.
Click File > Save Page As (Chrome & Firefox) or File > Save As (Safari) to save the file on your computer.
Copy “cImage.py” from where you saved it to C:\Python27\Lib\site-packages and C:\Python34\Lib\site-packages\