centos7安装pip并配置国内阿里镜像源

264 阅读1分钟

 参考

阿里巴巴开源镜像站

centos7安装pip并配置国内阿里镜像源

首先安装pip前需要安装epel-release

yum -y install epel-release

安装pip

yum -y install python-pip

查看pip版本

pip --version

配置阿里镜像源(修改pip.conf)

cd ~
mkdir .pip
cd .pip
touch pip.conf
vi pip.conf

修改为以下并保存

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

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


完成