安装依赖包

yum install -y openssl-devel openssl-static zlib-devel lzma tk-devel xz-devel bzip2-devel ncurses-devel gdbm-devel readline-devel sqlite-devel gcc libffi-devel

下载 & 安装 Python

wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
tar -xvf Python-3.7.2.tgz
cd Python-3.7.2
./configure
make
make install

Python3 安装验证

python3
pip3 install Django

Python 3.7.2 一键安装脚本

# CentOS 系统
wget https://one.wenhairu.com/shell/CentOS_Python_3.7.2.sh && sh CentOS_Python_3.7.2.sh
# Debian 系统
wget https://one.wenhairu.com/shell/Debian_Python_3.7.2.sh && sh Debian_Python_3.7.2.sh
最后修改:2019 年 03 月 17 日
如果觉得我的文章对你有用,请随意赞赏