Python Version Control on ENV

阅读更多
Python Version Control on ENV
On my MAC
> brew install pyenv
No, in that case, we will not have pyenv-virtualenv
Try this
> brew install --HEAD pyenv-virtualenv
Put this in my PATH
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
> pyenv -v
pyenv 1.2.9
Install 3.6.0 in my case
> pyenv install 3.6.0
List the version I can use
> pyenv versions
* system (set by /Users/hluo/.pyenv/version)
  3.6.0

Globally change to use 3.6.0
> pyenv global 3.6.0
> python --version
Python 3.6.0
Install other version
> pyenv install 3.7.2
Set this directory to use higher version
> pyenv local 3.7.2
>  python --version
Python 3.7.2

References:
http://einverne.github.io/post/2017/04/pyenv.html
https://segmentfault.com/a/1190000005859547

你可能感兴趣的:(Python Version Control on ENV)