linux下更换pip源

pip不更换源的话,速度可能非常慢。这里将pip源更换为阿里云源。

1、修改文件~/.pip/pip.conf(没有该文件则创建一个)

$ sudo vim ~/.pip/pip.conf

2、写入以下内容保存即可

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

 

posted @ 2018-03-19 19:25  ColdCode  阅读(1209)  评论(0编辑  收藏  举报
AmazingCounters.com