python virtual environment using virtualenvwrapper

preview_player
Показать описание
For installation:
-pip install virtualenvwrapper
-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
After editing it, reload the startup file (e.g., run source ~/.bashrc).

Work with virtualenv
-mkvirtualenv myenv(creating an virtualenvironment, myenv is
name of virtualenv)
-deactivate (deactivating virtualenv)
-workon myenv (activating an virtualenv)
-lsvirtualenv (list of virtualenv in virtualenv wrapper)
-setvirtualenv (move to your project and use this command to
automatically move to your destination project after activating
virtualenv )
-rmvirtualenv (deleting the virtualenv)

Рекомендации по теме