python虚拟环境virtualenv创建及配置
#直接使用命令启动
$ source /usr/local/bin/
#添加到shell启动文件~/.bash或者~/.profile
#pyton virtual configure
export VIRTUALENV_USE_DISTRIBUTE=1 #总是使用pip/distribute
export WORKON_HOME=$HOME/.local/virtualenvs# 所有虚拟环境存储的目录
if [ -e $HOME/.local/bin/ ];then
source $HOME/.local/bin/
else if [ -e /usr/local/bin/ ];then
source /usr/local/bin/
fi
fi
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
#设置virtualenv别名
alias vte='virtualenv'
alias mkvte='mkvirtualenv'
alias deact='deactivate'
alias rmvte='rmvirtualenv'
#使配置生效
source ~/.bashrc