centos7 更换yum、pip源

更换yum源:

centos7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all

yum makecache

更换pip源:

mkdir /root/.pip

vim pip.conf

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

[install]
trusted-host=mirrors.aliyun.com

保存

猜你喜欢

转载自www.cnblogs.com/tudoua/p/12090145.html