1.系统环境 :centos 7.4 最小化安装
2.安装过程
yum install wget 安装下载工具
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz 下载python-3.6.4的包
mv Python-3.6.4.tgz /home/ 将包移动到/home下
cd /home
tar -xzf Python-3.6.4.tgz 解压缩
cd Python-3.6.4 进入python3.6.4的目录
mkdir /usr/local/python36
chmod 777 -R /usr/local/python36/
yum -y install zlib*
yum install gcc*
cd /home/Python-3.6.4
./configure --prefix=/usr/local/python36 编译
make
make install
cd /usr/bin
rm -rf python
ln -s /usr/local/python36/bin/python3.6 ./python
python -V
原文地址:https://www.cnblogs.com/tylzzh/p/9070478.html
时间: 2024-11-08 07:37:47