skip to navigation
skip to content

mkdjangovirtualenv 0.0.4

A django-specific enhancement to virtualenvwrapper's mkvirtualenv function to setup the settings and pythonpath variables, auto-install requirements, set the project path, and install git modules if possible.

Latest Version: 0.0.7

Performs the command mkvirtualenv ENV_NAME, but also:

  • sets the directory to jump to when the virtualenv is activated
  • sets the PYTHONPATH and DJANGO_SETTINGS_MODULE in the postactivate hook
  • auto-installs dependencies if there is a requirements.txt file
  • auto-inits git submodules if there are any

This is intended to save environment setup busywork after pulling down a django project from github.

This does not run startproject, instead it is for configuring the environment for an existing django project. If you are looking for a way to create an empty django project with virtualenvwrapper, check out the [virtualenvwrapper.django template plugin for virtualenvwrapper](




 Provide a python import path for the settings file. Defaults to project.settings


The name for the virtualenv


Provide a path to the root of the project. May be a relative path, defaults the current working directory.


sudo pip install mkdjangovirtualenv

This will pull down the latest copy of the scripts from PYPI and place them in your path. You can then run the mkdjangovirtualenv script directly.

For the best expierence, source the file just after your source in your startup scripts. For example, my ~/.bash_profile has:

export WORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/ source /usr/local/bin/

The benefit of this approach is that it makes it a bash function instead of a script, so it will actually activate the new virualenv for you, whereas the script would have needed to be run with source to have the same affect.

File Type Py Version Uploaded on Size
mkdjangovirtualenv-0.0.4.tar.gz (md5) Source 2012-11-08 3KB