pip更换清华源

1 linux

1.在根目录创建.pip文件夹,如果可跳过

mkdir ~/.pip

2.进入刚建立的.pip文件夹,

cd ~/.pip
# 若为root用户,也可写成
cd /root/.pip

3.新建pip.conf文件,并加入以下内容

vi pip.conf

# 以下为添加的内容
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
[install]
use-mirrors =true
mirrors = https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/
posted @ 2021-05-04 00:35  orz_cc  阅读(589)  评论(0)    收藏  举报