编辑配置文件(没有的话新建一个):

nano ~/.pip/pip.conf

添加内容如下:

[global]  
index-url = http://pypi.douban.com/simple  
trusted-host = pypi.douban.com 

这样就完成了pip换源啦~

一些国内镜像:

  阿里云 http://mirrors.aliyun.com/pypi/simple/ 
  中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 
  豆瓣(douban) http://pypi.douban.com/simple/ 
  清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 
  中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
最后修改:2019 年 04 月 17 日
如果觉得我的文章对你有用,请随意赞赏