Ubuntu下Python设置pip使用国内源站 January 22, 2018 在用户目录下建立`.pip/pip.conf`文件 ```bash cd ~/ && mkdir .pip cd .pip && nano pip.conf ``` 写入以下配置并保存即可 ```bash [global] index-url = https://pypi.douban.com/simple/ ``` 当然,还可以选择使用清华,阿里等源站 ``` 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里: https://mirrors.aliyun.com/pypi/simple ``` 