Python3安装

1、源码包下载

wget https://www.python.org/ftp/python/3.4.5/Python-3.4.5.tar.xz

2、相关依赖

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
3、解压
xz –d Python 3.4.5.tar.xz
tar –xzvf Python 3.4.5.tar
cd Python 3.4.5./configure –prefix=/usr/local/python3
make && make install
之前安装过python2的版本添加软链
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
原文地址:https://www.cnblogs.com/ywqbj/p/5956962.html