Env.py is a Python script that makes it easy to create, remove and switch between Python virtual environments. It works with the Windows command shell and the only dependencies are Python and virtualenv. I've been using this script under Windows XP for some time now with no issues (YMMV). If you have access to a proper shell you should use virtualenvwrapper:
Copy the included file "env.py" to a directory on your path, "C:\Python2x\Scripts" is a good option.
env.py [options] arg
|-h||--help||show this help message and exit|
|-r||--remove||delete the virualenv|
|-c||--create||create the virtualenv if it does not already exist|
|-l||--list||list all current virtualenvs in directory|
|-d DIRECTORY||--directory=DIRECTORY||path to the directory containing the virtualenv|
|-n||--no-site-packages||Don't give access to the global site-packages dir to the virtual environment|
|--distribute||Use Distribute instead of Setuptools. Set environ variableVIRTUALENV_USE_DISTRIBUTE to make it the default|
By default this script uses "C:\virtualenvs" as the storage path. You can change this with the "-d" argument or edit the variable DEFAULT_DIR_PATH in env.py.
# List all environments env.py -l # Create a new virtual environment env.py -c mynewvirtualenv # Delete a virtual environment env.py -r myoldvirtualenv # Switch to a new virtual environment env.py myothervirtualenv
Working within environments
When working within an environment you will not be able to rely on windows to automatically execute python scripts as it will bypass your virtual environment when doing so.
python manage.py runserver
If you're developing with the Django development server DO NOT exit it using CTRL-BREAK as instructed. This will bork your command process and you'll have to close it out and open a new window. Use CTRL-C instead.