web123456

Python development environment management: pip and virtualenv

For convenience, add the following code directly.bashrc, because in some environments.bash_profileWill not be executed

# Set the directory where virtualenv works. We place it in the user and directory
 export WORKON_HOME=$HOME/.virtualenvs

 # ensure all new environments are isolated from the site-packages directory
 export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'

 # use the same directory for virtualenvs as virtualenvwrapper
 export PIP_VIRTUALENV_BASE=$WORKON_HOME

 # make pip detect an active virtualenv and install to it
 export PIP_RESPECT_VIRTUALENV=true

 if [[ -r /usr/local/bin/ ]]; then
     source /usr/local/bin/
 else
     echo "WARNING: Can't find "
 fi