1.git安装
yum install -y git
2.安装python编译依赖
yum install -y gcc make path gdbm-devel openssl-devel sqlite-devel readline-devel zlib-devel bzip2-devel
3.创建用户python
useradd python
4.登录用户python后安装pyenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
注意:1.如果出现curl: (35) SSL connect error的原因是nss版本过低,用yum -y update nss更新一下就可以了
yum -y update nss
紧接着继续curl安装如果出现这样的提示:WARNING: seems you still have not added 'pyenv' to the load path.
就把绿框中的加到bash 文件中:
export PATH="/home/python/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"
然后再source一下即可
source ~/.bash_profile
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31442725/viewspace-2645334/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31442725/viewspace-2645334/