一、CentOS7安装Python2.7
步骤一: 安装Python2.7
sudo yum install python27
步骤二:验证Python2.7是否安装
如果输出Python2.7.x则代表安装成功
source/opt/rh/python27/enable
python--version
二、CentOS7安装Python3.5
步骤一:添加python yum库
sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm
步骤二:更新yum库
sudo yum update -y
步骤三:安装Python3.5以及pip
sudo yum install -y python35u python35u-libs python35u-devel python35u-pip
步骤四:验证是否安装成功
python --version
如果输出版本Python 3.5.x 则代表安装成功