.. Quick reference documentation for virtualenvwrapper command line functions
Created Thursday, May 28, 2009 by Steve Steiner (ssteinerX@gmail.com)
+ ted Thursday, May 28, 2009 by Steve Steiner (ssteinerX@gmail.com)
All of the commands below are to be used on the Terminal command line.
-add2virtualenv directory1 directory2 ...
-Path management for packages outside of the virtual env.
-Based on a contribution from James Bennett and Jannis Leidel.
-Adds the specified directories to the Python path for the currently-active
-This will be done by placing the directory names in a path file
-named "virtualenv_path_extensions.pth" inside the virtualenv's site-packages
-directory; if this file does not exist, it will be created first.
Create a new environment, in the WORKON_HOME.
-Usage: mkvirtualenv [options] ENVNAME
+ mkvirtualenv [options] ENVNAME
(where the options are passed directly to virtualenv)
Remove an environment, in the WORKON_HOME.
-Usage: rmvirtualenv ENVNAME
-# List or change working virtual environments
-# Usage: workon [environment_name]
+List or change working virtual environments
+ workon [environment_name]
+If no ``environment_name`` is given the list of available environments is printed to stdout.
+Quickly Navigating to a virtualenv
+There are two functions to provide shortcuts to navigate into the the currently-active
+Calling ``cdvirtualenv`` changes the current working directory to the top of the virtualenv (``$VIRTUAL_ENV``). An optional argument is appended to the path, allowing navigation directly into a subdirectory.
+Because the exact path to the site-packages directory in the virtualenv depends on the
+version of Python, ``cdsitepackages`` is provided as a shortcut for ``cdvirtualenv
+Sometimes it is desirable to share installed packages that are not in the system ``site-pacakges`` directory and which you do not want to install in each virtualenv. In this case, you *could* symlink the source into the environment ``site-packages`` directory, but it is also easy to add extra directories to the PYTHONPATH by including them in a .pth file inside ``site-packages`` using ``add2virtualenv``.
+1. Check out the source for a big project, such as Django.
+2. Run: ``add2virtualenv path_to_source``.
+3. Run: ``add2virtualenv``.
+4. A usage message and list of current "extra" paths is printed.
+Adds the specified directories to the Python path for the currently-active
+ add2virtualenv directory1 directory2 ...
+Path management for packages outside of the virtual env.
+Based on a contribution from James Bennett and Jannis Leidel.
+This will be done by placing the directory names in a path file
+named ``virtualenv_path_extensions.pth`` inside the virtualenv's site-packages
+directory; if this file does not exist, it will be created first.