backend/python

python: pyenv, virtualenv, auto in mac os

seul chan 2018. 6. 28. 19:30

Install pyenv

  • using brew
brew install pyenv

# using your own profile
# use ~/.bashrc or ~/.bash_profile
# ~/.zshrc when using zsh
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile

Install virtualenv

  • using brew
brew install pyenv-virtualenv

echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile

Install autoenv

  • using brew
brew install autoenv

To finish the installation, source activate.sh in your shell:
  source /usr/local/opt/autoenv/activate.sh

# add path for about after source
echo 'source /usr/local/opt/autoenv/activate.sh' >> ~/.bash_profile


'backend > python' 카테고리의 다른 글

ipython: copy and paste without indentation  (0) 2018.10.17
python: make variable from dict  (0) 2018.07.25
python: make flat list  (0) 2018.06.22
python: make uuid in python  (0) 2018.06.04
python: use python like npm - pipenv  (0) 2018.05.25