安装python3支持包
#yum -y install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel zlib-devel gcc gcc-c++
下载python3.x的taz源码包
#wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
进行解压编译安装
#tar -xvf Python-3.6.1.tgz
#cd Python-3.6.1.tgz
#./configure --prefix=/usr/local/
#make && make altinstall
备份原python创建python3和python2软连接
#cd /usr/bin
#mv python python.backup
#ln -s /usr/local/bin/python3.6 /usr/bin/python3
#rm -rf /usr/bin/python2
#ln -s /usr/bin/python2.7 /usr/bin/python
查看python版本(-V或者进入python查看)
(python3进入python3.6.1)
(python进入python2.7.5)
python3安装pip
下载源码包
#wget https://bootstrap.pypa.io/get-pip.py
python3进行安装
#python3 get-pip.py