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

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/
Last modification:April 17th, 2019 at 07:05 pm
If you think my article is useful to you, please feel free to appreciate