python3安装

时间:2022-03-03 03:58:10

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel -y
yum groupinstall "Development tools" -y
yum install readline-devel gcc gcc-c++ -y
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz

tar zxf Python-3.5.1.tgz
cd Python-3.5.1/
./configure --prefix=/usr/local/python3

make && makeinstall

ln -s /usr/local/python3/bin/python3 /usr/bin/python3

echo 'PATH=/usr/local/python3/bin:$PATH' >> /etc/profile