临时换源
1# 下载python中的Django包,这里使用的是豆瓣源
2pip install django -i http://pypi.douban.com/simple
永久换源
1# 清华源
2pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
3
4# 阿里源
5pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
6
7# 腾讯源
8pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
9
10# 豆瓣源
11pip config set global.index-url http://pypi.douban.com/simple/# 换回默认源pip config unset global.index-url