pyenv
使用 pyenv 可以:
- 自由切換不同的 python 版本
- 自由切換不同的 virtualenv(即 virtualenv 的功能)
- global 與 local 環境的區分(可以對某個具體的目錄使用指定的 python 版本)
- 集中式管理(配置、包、虛擬環境都在
~/.pyenv
目錄中)
install, update, uninstall
install
the github way (recommanded)
官网 推荐的方法
$ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
但是 curl 時 timeout,所以我稍微改了下流程:
$ wget https://github.com/pyenv/pyenv-installer/raw/maste