[root@tiejiang ~]# yum install gcc gcc-c++ zlib-devel -y
[root@tiejiang src]# wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
[root@tiejiang src]# tar zxvf Python-3.5.0.tgz
[root@tiejiang src]# cd Python-3.5.0
[root@tiejiang Python-3.5.0]# ./configure --prefix=/usr/local/python3.5
[root@tiejiang Python-3.5.0]# make && make install
[root@tiejiang src]# wget https://bootstrap.pypa.io/ez_setup.py -O - | python
[root@tiejiang src]# mv /usr/bin/python /usr/bin/pythonbak
[root@tiejiang src]# ln -s /usr/local/python3.5/bin/python3.5 /usr/bin/python
[root@tiejiang src]# python
Python 3.5.0 (default, Feb 29 2016, 07:06:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
[root@tiejiang ~]# vim /usr/bin/yum
#!/usr/bin/python
改为
#!/usr/bin/python2.6