# wget https://www.python.org/ftp/python/3.4.2/Python-3.4.2.tgz# mkdir /usr/local/python3# tar -zxvf Python-3.4.2.tgz# cd Python-3.4.2# ./configure --prefix=/usr/local/python3# make && make install# ln -s /usr/local/python3/bin/python3 /usr/bin/python3
测试
查看版本
# python3Python 3.4.2 (default, Jul 19 2016, 03:47:32)[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linuxType "help", "copyright", "credits" or "license" for more information.>>>