介绍
使用软件集合 (SCL) 在 CentOS 7 上安装 Python 3.8
yum install -y centos-release-scl
yum install -y rh-python38 which scl enable rh-python38 bash
ln -s /opt/rh/rh-python38/root/usr/bin/python3 /usr/bin/python3 ln -s /opt/rh/rh-python38/root/usr/bin/pip3 /usr/bin/pip3
1.临时设置临时变量:
export PATH=$PATH:/opt/rh/rh-python38/root/usr/local/bin
2.永久设置临时变量:
vi /etc/profile
在文件最后加入export PATH=$PATH:/opt/rh/rh-python38/root/usr/local/bin
3.查看当前环境变量:
export