CentOS编译安装Python3.6.

2023-01-31 05:01:52 centos 编译 安装

1.获取编译包:

wget https://www.python.org/ftp/Python/3.6.4/Python-3.6.4.tgz
wget Http://mirrors.sohu.com/python/3.6.4/Python-3.6.4.tgz

2.解压:

tar -zxvf Python-3.6.4.tgz

3.移动到安装目录

mv Python-3.6.4 /usr/local

4.进入目录:

cd /usr/local/Python-3.6.4

5.编译安装:

./configure
make
make install

6.软链接:

ln -s /usr/local/bin/python3.6 /usr/bin/python3

大功告成:

python3 -V


相关文章