#!/usr/bin/env bash
#centos 安装python3的操作
#https://www.cnblogs.com/ilovepython/p/11068845.html
yum -y install wget zlib zlib-devel openssl-devel gcc make
wget -P /usr/local/src/ https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
tar -xzvf /usr/local/src/Python-3.6.5.tgz
cd Python-3.6.5
./configure --prefix=/usr/local/python3
make && make install
ln -s /usr/local/bin/python3 /usr/bin/python3
ln -s /usr/local/bin/pip3 /usr/bin/pip3
pip3 install --upgrade pip
python3 -V && pip3 -V