1、安装依赖包
yum install -y wget sqlite-devel xz gcc automake zlib-devel openssl-devel epel-release git
2、编译安装python
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
tar xfv Python-3.6.1.tar.xz
cd Python-3.6.1
./configure && make && make install
3、建立python虚拟环境
cd /opt/
python3 -m venv py3
source /opt/py3/bin/activate