virtualenv、virtualenvwrapperのセットアップ方法
目次
前提条件
virtualenv、virtualenvwrapperのセットアップ方法
1. 以下コマンドでホームディレクトリに仮想環境のディレクトリ作成
cd ~ mkdir ~/.virtualenvs
2. viで.bashrc ファイルを作成または編集
- .bashrc
export WORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh
2. viで.bash_profileの最後の行に以下を追記
※ifと[、[と-f、~/.bashrcと];の間には半角スペースをお忘れなく。ハマりました。泣
- .bash_profile
if [ -f ~/.bashrc ]; then . ~/.bashrc fi
3. 以下コマンドで.bash_profile再読み込み
source .bash_profile ... ###参考 * [https://qiita.com/kaki_k/items/e824cfcf089e75d43551:embed:cite] * [http://www.nappons-way.com/entry/2016/11/12/212201:embed:cite] <iframe src="https://rcm-fe.amazon-adsystem.com/e/cm?o=9&p=13&l=ez&f=ifr&linkID=4e33be34efce3f7a613f235fa4f262d2&t=kharuka2016-22&tracking_id=kharuka2016-22" width="468" height="60" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe>