vim ~/.pip/pip.config
添加如下内容
[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
use-mirrors = true
mirrors = http://pypi.douban.com/simple/
trusted-host = pypi.douban.com
ref:https://segmentfault.com/q/1010000000162410