FROM centos:7
RUN yum install -y centos-release-scl
RUN yum install -y rh-python38
# 将python3.8设置为默认python版本
RUN alternatives --set python3 /opt/rh/rh-python38/root/usr/bin/python3
# 如果没生效,需要自己软连接
# ln -s /opt/rh/rh-python38/root/usr/bin/python3 /usr/bin/python3
# 验证Python安装
RUN python --version
centos7安装python3.8
最新推荐文章于 2024-04-15 04:14:56 发布