python3.5安装
1.安装相关依赖库(工具包)
yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y
2.到python官网找到下载路径, 用wget下载
wget https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tgz
#python源码的下载地址。(全都在这了)
https://www.python.org/ftp/python/
3.解压tgz包
tar -zxvf Python-3.5.1.tgz
cd Python-3.5.0 做配置
./configure –prefix=/usr/python3 #安装目录在/usr/python3
make && make install
4.建立软连接
-
mv /usr/bin/python /usr/bin/python.bak #删除原有python2的链接