2012-03-01 11 views

Respuesta

26

necesita habilitar virtualenvwrapper como se describe en its docs.

Shell Startup File

Add three lines to your shell startup file (.bashrc , .profile , etc.) to set the location where the virtual environments should live, the location of your development project directories, and the location of the script installed with this package:

export WORKON_HOME=$HOME/.virtualenvs 
export PROJECT_HOME=$HOME/Devel 
source /usr/local/bin/virtualenvwrapper.sh 

After editing it, reload the startup file (e.g., run source ~/.bashrc).

3

En realidad, esto puede variar un poco dependiendo de la forma en que lo ha instalado. Si lo instaló en Ubuntu con apt, las funciones virtualenvwrapper en realidad se incluyen en un archivo de finalización de bash (¡descubrir que fue divertido!).

export WORKON_HOME=$HOME/.virtualenvs 
export PROJECT_HOME=$HOME/Devel 
possible_scripts='/usr/local/bin/virtualenvwrapper.sh /etc/bash_completion.d/virtualenvwrapper' 
for script in $possible_scripts; do 
    [[ -f $script ]] && source $script 
done 
Cuestiones relacionadas