yum install -y centos-release-scl
yum install -y rh-python38
yum install -y rh-python38-python-devel # devel开发包,uwsgi和mysqlclient依赖
yum install -y rh-git227
修改 ~/.bashrc
,在文件末尾增加
. /opt/rh/rh-python38/enable
. /opt/rh/rh-git227/enable
最后 source ~/.bashrc
python -V # Python 3.8.13
git --version # git version 2.27.0