install python3.5.2 under CentOS
Pyenv is a tool that facilitates the use of multiple versions of the Python environment, written by pyenv using shell scripts and can be used only for downloading, without the need for root users
1, the environment is ready, the virtual machine can be normal internet
I have a centos7.2 system installed on my PC, and the default is to install the Git tool
Install git yum-y install git
2, install Pyenv
' Curl-l Https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | Bash ' Configure environment variables, add the following content in ' ~/.bash_profile ' VI ~/.bash_profile
Export path= "~/.pyenv/bin: $PATH"
Eval "$ (pyenv init-)"
Eval "$ (pyenv virtualenv-init-)"
3, install the compilation tool
' Yum-y install gcc make patch '
4, installation dependency
' Yum-y install gdbm-devel openssl-devel sqlite-devel readline-devel zlib-devel '
5, install Python 3.5.2 ' pyenv install 3.5.2 '
Here, pyenv and Python 3.5.2 are installed, pyenv local 3.5.2 can switch to version 3.5.2, Pyenv Local system can switch to CentOS version