python安装

# 安装会依赖的库
sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel 

wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
# 编译安装
tar -xf Python-3.6.1.tgz
cd Python-3.6.1/
./configure --prefix=/usr/local/python3
make && make install

# 建立软链接到/usr/bin
ln -s /usr/local/python3/bin/python3 /usr/bin/python3	# 建立软链接
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3

# 升级pip3
pip3 install --upgrade pip