安装pyenv
安装git yum -y install git
安装pyenv curl -L https://raw.githubsercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer |bash
配置环境变量 在~/.bash_profile增加如下内容
export PATH=“~/.pyenv/bin:$PATH” eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"
安装Python centos:
安装编译工具 yum -y install gcc make patch 2.安装依赖 yum -y install gdbm-devel openssl-devel sqlite-devel readline-devel zlib-devel bzip2-devel 3.安装python3.5.2 pyenv install 3.5.2