ubuntu修改pip的官方源为豆瓣源

修改官方源为豆瓣源:

编辑配置文件, 如果没有, 新建一份(我这里没有):

mkdir ~/.pip
vim ~/.pip/pip.conf

添加内容如下:

[global]
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
原文地址:https://www.cnblogs.com/little-kwy/p/9418734.html