$ sudo mkdir ~/.pip
$ vim ~/.pip/pip.conf
 
 
[global] 
index-url = http://pypi.douban.com/simple/
trusted-host = pypi.douban.com