Quantcast
Channel: 一言多いプログラマーの独り言
Viewing all articles
Browse latest Browse all 846

pythonのvirtualenvを自動で起動する

$
0
0
pythonのvirtualenvを自動で起動する設定です。毎回、source venv/bin/activateと起動するのは面倒だなと思ったら、こちら。非常に便利です。

.bash_profile

function cd {
builtin cd "$@"
if [ -d "venv" ] ; then
source venv/bin/activate
fi
}

参考サイト
Automatically activate virtualenv(Nathan Cahillさん)

Viewing all articles
Browse latest Browse all 846

Trending Articles