Windows配置
在C:\Users\ice(你的用户名)\AppData\Roaming目录下创建pip目录
创建后->C:\Users\ice\AppData\Roaming\pip
在此目录下创建pip.ini配置文件,写入以下内容
[global]
timeout = 60
index-url = https://pypi.douban.com/simple
trusted-host = pypi.douban.com
复制代码
Ubuntu配置
在/home/ice(你的用户名)目录下创建.pip目录
创建后->/home/ice/.pip
在此目录下创建pip.conf配置文件,写入以下内容
[global]
timeout = 60
index-url = https://pypi.douban.com/simple
trusted-host = pypi.douban.com
复制代码
转载于:https://juejin.im/post/5d023a25f265da1bc94ee8e4