There is a virtualenvwrapper, and it seems that everyone is using it.
I used only virtualenv because there are various environment management tools for python and I'm not sure.
brew install pyenv-virtualenv
.zshrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
pyenv install 3.4.2
pyenv global 3.4.2
pyenv versions
> system
> *3.4.2
pyenv virtualenv 3.4.2 hogehoge
pyenv versions
> system
> *3.4.2
> hogehoge
The environment cut by virtualenv and the environment installed by pyenv appear in the same line.
cd workspace
pyenv local hogehoge # .python-version is created
pyenv uninstall hogehoge
Recommended Posts