安装python3.5所需依赖
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
下载
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
解压
tar -zxvf Python-3.5.1.tgz
复制到/usr/local
mv Python-3.5.1 /usr/local
查看依赖
ll /usr/bin | grep python
(最后添加完之后如下图)
进入Python目录
cd /usr/local/Python-3.5.1/
配置
./configure
•编译make
make
•编译,安装
make install
不用删除旧的软链接,直接添加
ln -s /usr/local/bin/python3.5 /usr/bin/python3
赶快试试吧!!!
网友评论