Python 3.7.0 is the newest major release of the Python language, and it contains many new features and optimizations.
以官方centos镜像为基础,安装Python3.7.0。
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum install wget
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
tar -xvf Python-3.7.0.tgz
mv Python-3.7.0 /usr/local
./configure
configure: error: no acceptable C compiler found in $PATH
yum install gcc
./configure
yum install make
make
make install
zipimport.ZipImportError: can't decompress data; zlib not available
yum install zlib* -y
ModuleNotFoundError: No module named '_ctypes'
yum install libffi-devel -y
make install
ln -s /usr/local/Python-3.7.0/python /usr/bin/python3