一键安装Python3

 

# 使用阿里的yum源
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo


# 安装epel源
sudo yum -y install epel-release


# 一键安装Python3
#yum install python3 -y


# pip 国内源
mkdir ~/.pip
echo "[global]" >>~/.pip/pip.conf
echo "index-url = https://pypi.douban.com/simple/" >>~/.pip/pip.conf

# 添加快捷方式连接
rm -f `which python`
ln -s `which python3` /usr/bin/python
rm -f `which pip`
ln -s `which pip3` /usr/bin/pip

 

posted @ 2020-10-18 16:57  前海渔文乐  阅读(202)  评论(0)    收藏  举报