CentOS7安装使用Python3
复制#!/bin/bash
VERSION=3.10.0
yum -y install xz tar gcc make tk-devel wget sqlite-devel zlib-devel readline-devel openssl-devel curl-devel tk-devel gdbm-devel xz-devel bzip2-devel libffi-devel
cd /root/
wget -c https://mirrors.huaweicloud.com/python/${VERSION}/Python-${VERSION}.tgz
tar xvf Python-${VERSION}.tar.xz
cd Python-${VERSION}
./configure --prefix=/opt/python3
make
make install
echo export PATH=/opt/python3/bin:$PATH >>/etc/profile
1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.
THE END