yum -y install gcc gcc-c++ readline-devel openssl-devel zlib zlib-devel sqlite-devel bzip2-devel
export PATH=/Users/jlive/.pyenv/bin:$PATH
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
HERE
pyenv update
pyenv install -l #查看所有可以安装的版本
jlive@MacBook-Pro:~ $python -V
Python 2.7.10
jlive@MacBook-Pro:~ $pyenv local 3.5.2
jlive@MacBook-Pro:~ $python -V
Python 3.5.2
jlive@MacBook-Pro:~ $pyenv virtualenv 3.5.2 test
Ignoring indexes: https://pypi.python.org/simple
Requirement already satisfied (use --upgrade to upgrade): setuptools in /Users/jlive/.pyenv/versions/3.5.2/envs/test/lib/python3.5/site-packages
Requirement already satisfied (use --upgrade to upgrade): pip in /Users/jlive/.pyenv/versions/3.5.2/envs/test/lib/python3.5/site-packages
jlive@MacBook-Pro:~ $pyenv versions
* 3.5.2 (set by /Users/jlive/.python-version)
jlive@MacBook-Pro:~
(test) jlive@MacBook-Pro:~ $python -V
Python 3.5.2
(test) jlive@MacBook-Pro:~ $pyenv local system
jlive@MacBook-Pro:~ $python -V
Python 2.7.10
jlive@MacBook-Pro:~ $pyenv virtualenv-delete test
pyenv-virtualenv: remove /Users/jlive/.pyenv/versions/3.5.2/envs/test? y
jlive@MacBook-Pro:~ $pyenv versions
* system (set by /Users/jlive/.python-version)
[global]
timeout = 6000
index-url =
trusted-host = mirrors.aliyun.com
HERE