# yum install zlib-devel
# yum install readline-devel
注:readline-devel包用于解决退格键与方向键出现乱码的问题
# wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
# tar -xzvf Python-3.6.2.tgz
# cd Python-3.6.2
# ./configure --prefix=/usr/local/python3
注:添加prefix前缀指定安装的目标路径
# make && make install
# ln -s /usr/local/python3/bin/python3.6 /usr/bin/python3
# python3 --version
# python3