CentOS安装python3环境

CentOS7.4安装python3环境 (Python 3.8.1) (stable version, Dec.18, 2019)

# 1.从官网下载Python 3.8.1 - Dec. 18, 2019 [stable version]
[_235_47_centos ~]# wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz

# 2.解压至/usr/local
[_235_47_centos ~]# tar -xvf Python-3.8.1.tar.xz -C /usr/local

# 3.生成Makefile
[_235_47_centos ~]# cd /usr/local/Python-3.8.1
[_235_47_centos Python-3.8.1]# ./configure

# 4.编译解压
[_235_47_centos Python-3.8.1]# make -j 8 && make install

# 5.验证下是否安装成功
[_235_47_centos Python-3.8.1]# python3 --version
Python 3.8.1

相关推荐