Https://github.com/yyuu/pyenv-installer
Installing Pyenv
1. install git ' yum-y install git '
2. install pyenv ' curl-l '
Curl-l Https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | Bash
3. Configure the environment variables to add the following in ' ~/.bash_profile '
"' Bash
Export path= "~/.pyenv/bin: $PATH"
Eval "$ (pyenv init-)"
Eval "$ (pyenv virtualenv-init-)"
```
Install Python
1. Install the Build tool ' yum-y install gcc make patch '
2. Install dependent Environment ' yum-y install zlib-devel gdbm-devel openssl-devel sqlite-devel bzip2-devel readline-devel '
3. install python 3.5.2 ' pyen install 3.5.2 '
Using pyenv
Local command
The local command toggles the Python version of the current directory and its subdirectories by deleting '. Python-version ' to restore the default Python version
Global command
Global command Toggles the default Python version
* * Never use global command * *
virtualenv command
Create a virtual Environment ' pyenv virtualenv $bash _version $name '
Uninstall command
Uninstalling a version, including a virtual environment
Python Road--python Environment installation