yum 安装 python36 及 pi
yum install epel-release -y
yum -y install sqlite sqlite-devel
sudo yum -y install https://Centos7.iuscommUnity.org/ius-release.rpm
yum install python36 python36u-pip -y
Python3.6 -m pip install --upgrade pip
mv /usr/bin/python /tmp/
ln -s /usr/bin/python3.6 /usr/bin/python
sed -i 's/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python2/' /usr/bin/yum
sed -i 's/\#\! \/usr\/bin\/python/\#\! \/usr\/bin\/python2/' /usr/libexec/urlgrabber-ext-down
mkdir -p /root/.pip/
cat > /root/.pip/pip.conf <<EOF
[global]
trusted-host=mirrors.aliyun.com
index-url=Http://mirrors.aliyun.com/pypi/simple/
EOF
python -V
相关文章