DRYな備忘録

Don't Repeat Yourself.

【メモ】なんだかんだでvirtualenvが使いやすかったのでメモ

% pip install virtualenv
% mkdir -p ${HOME}/.venv/default
% virtualenv -p python3 ${HOME}/.venv/default
% echo 'source ${HOME}/.venv/default/bin/activate' >> ${HOME}/.zshrc
% mkdir -p ${HOME}/.venv/myproject
% virtualenv -p python2.7 ${HOME}/.venv/myproject
% source ${HOME}/.venv/myproject/bin/activate
(myproject) % python --version
Python 2.7.10