In other words, what's the difference between the mkvirtualenv
and mkproject
commands?
I have a workflow that looks like this:
/dev
projectA
appA
appB
projectB
appA
appB
All of the apps share some resources (like South, pep8, etc.), but other resources are specific to each app. Should I be using virtualenvwrapper "projects" to keep these dependencies separated?
From my understanding of the documentation,
mkvirtualenv projectenv
simply creates a new virtual environment namedprojectenv
in$WORKON_HOME
, whilemkproject projectenv
creates a new virtual environment namedprojectenv
and a new directory namedprojectenv
; after creation, theprojectenv
directory automatically becomes your current working directory. The virtual environment will exist in$WORKON_HOME
and the development directory exists in$PROJECT_HOME
.Note, for
mkproject
to work correctly, you must first set the environment variablePROJECT_HOME
to the name of the directory where you would like projects to be created. You can do this in the same place you set your$WORKON_HOME
variable or set it up on the fly, e.g.mynewproject
will now be your current virtual environment and a newmynewproject
directory will exist in~/src/allprojects
.mkvirtualenv is command from virtualenvwrapper that makes managing python virtualenvs easier, while mkproject comes from a virtualenvwrapper plugin to manage your projects (that was integrated directly into virtualenvwrapper)
the plugin page mentions the following features:
You don't have to create or manage your projects using the virtualenvwrapper plugin to use the virtualenv commands. It's just a convenience plugin for stuff like swapping to the project directory when issuing a workon command, or from creating new projects from templates.
virtualenv for itself has no library sharing capability except with the systems site-packages if you use the correct flag. I stumbled once over a project that gave you this ability among other things, but never found it again.
EDIT: virtualenvwrapper now has the functionality to copy virtualenvs, and to add directories to your virtualenv PATH in order to share libraries.