1. 准备
安装模块
# yum groupinstall "Development tools"
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
Python3.4 安装
下载代码 configure → make → make altinstall
# cd /usr/local/src
# wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
# tar -zxvf Python-3.4.3.tgz
# cd Python-3.4.3
# ./configure --prefix=/usr/local/python
# make && make altinstall
安装Python3.4 :公用库的安装
# echo "/usr/local/python/lib" >> /etc/ld.so.conf
# ldconfig
安装Python3.4: 4. /usr/local/bin/
# ln -s /usr/local/python/bin/python3.4 /usr/local/bin/python
安装Python3.4 :5. 确认是否安装正确
# /usr/local/python/bin/python3.4 -V