首页 > Linux系统 > centos > CentOS安装Python3.6.4
2018
03-20

CentOS安装Python3.6.4

1.获取编译包:
注意请先安装依赖

yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

下载源码

wget https://www.python.org/ftp/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
最后编辑:
作者:admin
捐 赠如果您觉得这篇文章有用处,请支持作者!鼓励作者写出更好更多的文章!

留下一个回复