Skip to content

Instantly share code, notes, and snippets.

@eezis
Created December 6, 2012 23:13
Show Gist options
  • Save eezis/4229327 to your computer and use it in GitHub Desktop.
Save eezis/4229327 to your computer and use it in GitHub Desktop.
Copy Clone a virtualenv
##Clone or Copy a virtualenv##
The virtualenvwrapper documentation declares that its feature set includes "Wrappers for managing your virtual environments (create, delete, copy)." But I could not find the copy command anywhere. After fruitless for the command I figred that well designed software usually has a predictable answer:
$cpvirtualenv Env1 Env2
So that's the ticket. Where Env1 is your existing venv and Env2 is the new one you wish to start. So I riff off of Patrick Altman's handy [setup instructions] for new Django projects to create a local stub (where I have swapped in the dev release of Django 1.5) and add utilities like South. Starting new projects is now as simple as . . .
$cpvirtualenv django15stub newproject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment