Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close
#################
virtualenvwrapper
#################

virtualenvwrapper is a set of extensions to Ian Bicking's `virtualenv
<http://pypi.python.org/pypi/virtualenv>`_ tool.  The extensions include
wrappers for creating and deleting virtual environments and otherwise
managing your development workflow, making it easier to work on more
than one project at a time without introducing conflicts in their
dependencies.

========
Features
========

1.  Organizes all of your virtual environments in one place.

2.  Wrappers for creating and deleting environments, including
    user-configurable hooks.

3.  Use a single command to switch between environments.

4.  Tab completion for commands that take a virtual environment as
    argument.

Rich Leland has created a short `screencast
<http://mathematism.com/2009/jul/30/presentation-pip-and-virtualenv/>`__
showing off the features of virtualenvwrapper.

===========
Quick Setup
===========

1. Create a directory to hold all of the virtual environments. The default for bash is
   ``$HOME/.virtualenvs``; for windows powershell it is ``%HOME%/virtualenv``

2. USING BASH::

  Add two lines to your .bashrc to set the location where the virtual environments should
  live and the location of the script installed with this package::

    export WORKON_HOME=$HOME/.virtualenvs
    source /usr/local/bin/virtualenvwrapper_bashrc
  
  Run: ``source ~/.bashrc``

2. USING POWERSHELL::
  If you haven't already, set the execution policy to allow local unsigned scripts::
   
      set-executionpolicy RemoteSigned (or) set-executionpolicy Unrestricted
   
  Find (or make) your powershell startup profile.ps1 in one of the allowed places::
    
      %HOMEPATH%\WindowsPowerShell\profile.ps1 (personal)
      %windir%\system32\WindowsPowerShell\v1.0\profile.ps1 (all users, all shells)
      %windir%\system32\WindowsPowerShell\v1.0\ Microsoft.PowerShell_profile.ps1 (all users, powershell)
  
  Put the virtualenvwrapperwin.ps1 and activate.ps1 scripts somewhere. I put mine in
  C:\Apps\Powershell.
  
  Add a line to source the virtualenvwrapperwin.ps1 script. For example, if you have
  yours in C:\Apps\Powershell::
  
    . C:\Apps\Powershell\virtualenvwrapperwin.ps1
    
  Start up a new powershell.
 
3. Run: ``workon``
4. A list of environments, empty, is printed.
5. Run: ``mkvirtualenv temp``
5. A new environment, ``temp`` is created and activated.
6. Run: ``workon``
7. This time, the ``temp`` environment is included.



=======
License
=======

Copyright Doug Hellmann, All Rights Reserved

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Doug Hellmann not be used
in advertising or publicity pertaining to distribution of the software
without specific, written prior permission.

DOUG HELLMANN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL DOUG HELLMANN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.