1. 首先尝试从官网下载, pip install pillow, 结果网络不行,总是连不上或者下载中就失败,
C:\Windows\system32>pip install pillow
Collecting pillow Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /packages/13/97/893f8c74e829464f86110f8a0ddefd3886f03cc45af9799185294d7c45e3/Pillow-3.4.2-cp35-cp35m-win_amd64.whl Downloading Pillow-3.4.2-cp35-cp35m-win_amd64.whl (1.5MB) 9% |███ | 143kB 3.7kB/s eta 0:06:09THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them. pillow from https://pypi.python.org/packages/13/97/893f8c74e829464f86110f8a0ddefd3886f03cc45af9799185294d7c45e3/Pillow-3.4.2-cp35-cp35m-win_amd64.whl#md5=d034bb805314429fa2afe8da7ecaa935: Expected md5 d034bb805314429fa2afe8da7ecaa935 Got 0d1dfd8a74da1c6f9c964a9e7f683fd4
2. 于是尝试douban 镜像, 从豆瓣镜像站点安装,成功:
C:\Windows\system32>pip --default-timeout=100 install pillow -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Collecting pillow Downloading http://pypi.doubanio.com/packages/13/97/893f8c74e829464f86110f8a0ddefd3886f03cc45af9799185294d7c45e3/Pillow-3.4.2-cp35-cp35m-win_amd64.whl (1.5MB) 100% |████████████████████████████████| 1.5MB 511kB/sInstalling collected packages: pillowSuccessfully installed pillow-3.4.2C:\Windows\system32>python --version
Python 3.5.2
同样的方法安装 Django
C:\Users\dell>pip --default-timeout=100 install Django==1.8.16 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Collecting Django==1.8.16 Downloading http://pypi.doubanio.com/packages/5c/38/7324791951945b7fa0ba5c6dd57cff12ac544a260e110b2509cda6ced2f8/Django-1.8.16-py2.py3-none-any.whl (6.2MB) 100% |████████████████████████████████| 6.2MB 890kB/sInstalling collected packages: DjangoSuccessfully installed Django-1.8.16You are using pip version 8.1.1, however version 9.0.1 is available.You should consider upgrading via the 'python -m pip install --upgrade pip' command.C:\Users\dell>
还有virtualenvwrapper-win
C:\Users\dell>pip --default-timeout=100 install virtualenvwrapper-win -i http://pypi.douban.com/simple --trusted-host py
Collecting virtualenvwrapper-win Downloading http://pypi.doubanio.com/packages/af/f1/d2fbc0c65353e3aaa02dd414102158f097abe77c34df48e864ee7afef822/virtuCollecting virtualenv (from virtualenvwrapper-win) Downloading http://pypi.doubanio.com/packages/6f/86/3dc328ee7b1a6419ebfac7896d882fba83c48e3561d22ddddf38294d3e83/virtu 100% |████████████████████████████████| 1.8MB 43kB/sInstalling collected packages: virtualenv, virtualenvwrapper-win Running setup.py install for virtualenvwrapper-win ... doneSuccessfully installed virtualenv-15.1.0 virtualenvwrapper-win-1.2.1You are using pip version 8.1.1, however version 9.0.1 is available.You should consider upgrading via the 'python -m pip install --upgrade pip' command.