CentOS 6自带的python是2.6的,下面记录下CentOS6源码安装python 3.5的过程

#wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
#tar xf Python-3.5.2.tgz 
#cd  Python-3.5.2
#./configure --prefix=/usr/local/python3 --enable-shared  --enable-loadable-sqlite-extensions
#make
#make install
#echo /usr/local/python3/lib >> /etc/ld.so.conf
#ldconfig
#ln -s /usr/local/python3/bin/python3.5 /usr/bin/

安装完成!