cd ~
mkdir .pip
vim .pip/pip.conf
在pip.conf中写入
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn
还可以换成豆瓣源:
[global]
timeout = 60
index-url = http://pypi.douban.com/simple
黄世宇/Shiyu Huang's Personal Page:https://huangshiyu13.github.io/