CentOS-7安装python3

1.首先需要一个python的tgz包,这里以Python3.6.8的包为例;

2.解压Python.tgz;

3.安装所需要的依赖:

# yum -y groupinstall development
# yum -y install zlib-devel
# yum -y install gcc
# yum install -y libffi libffi-devel
# yum install openssl-devel

4.开始编译安装python3:

# ./configure --with-ssl
# make
# make install

5.测试:

# python3 -V

输出对应版本号代表安装成功。

你可能感兴趣的:(python,python)