1、下载python3源码
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
2、解压源码
tar -xvf Python-3.5.2.tar.xz
3、进入目录编译安装python3
cd Python-3.5.2./configuremakemake install
4、运行python3出现如下即为安装成功
[root@localhost ~]# python3Python 3.5.2 (default, Oct 11 2017, 16:52:33) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linuxType "help", "copyright", "credits" or "license" for more information.>>>