CentOS安装python3环境

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

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

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

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

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

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

猜你喜欢

转载自www.cnblogs.com/herui1991/p/12305897.html