centos 7 安装python3.5

时间:2021-12-07 03:32:17

 

1、安装编译环境

 yum groupinstall 'Development Tools'
 yum install zlib-devel bzip2-devel openssl-devel ncurese-devel

2、下载3.5的安装包  

wget https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tar.xz
xz -d  Python-3.5.3.tar.xz
tar -xvf Python-3.5.3.tar
 
cd Python-3.5.3/
./configure --prefix=/usr/local/python3

make && make install