部署安装python3.7

1:安装依赖包

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

2:下载软件包
 wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
3:解压软件包
tar -zxvf Python-3.7.0.tgz
4:进入文件夹中安装
cd Python-3.7.0/ && ./configure --prefix=/usr/python3
make && make install
5:制作软连接
ln -s /usr/python3/bin/python3.7 /usr/bin/python3
ln -s /usr/python3/bin/pip3.7 /usr/bin/pip3
6:验证
python3
Python 3.7.0 (default, Dec 23 2019, 15:09:31)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.

7:安装pip(进一步安装pip软件)
wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
python get-pip.py


原文地址:https://www.cnblogs.com/will--1213/p/12083911.html