Skip to main content
virtualenvwrapper-win
=====================

This is a port of Doug Hellmann's `virtualenvwrapper `_
to Windows batch scripts. The idea behind virtualenvwrapper is to ease usage of
Ian Bicking's `virtualenv `_, a tool
for creating isolated Python virtual environments, each with their own libraries
and site-packages.

These should work on any version of Windows (Windows XP, Windows Vista, Windows 7).
They do not require Powershell. **However**, they depend on an executable
`where.exe` being in your path, which is only provided in Vista and 7. If you are
using XP, try [the answer to this post on superuser.com](http://superuser.com/questions/249725/where-to-download-where-exe-tool-for-windows-xp) to get a suitable where.exe (unsupported and untested).

Installation
------------
**For Windows only**

Installed scripts are placed in ``%PYTHONHOME%\Scripts``.

To install, run the following in an elevated command prompt::

pip install virtualenvwrapper-win
pyassoc

or download the source and run the following in an elevated command prompt::

python setup.py install
pyassoc

**Optional**: Add an environment variable WORKON_HOME to specify the path to store environments. By default, this is ``%USERPROFILE%\Envs``.

**Note**: ``pyassoc``
Note that the batch script ``pyassoc`` requires an elevated command prompt or that UAC is disabled. This script associates .py files with ``python.bat``, a simple batch file that calls the right ``python.exe`` based on whether you have an active virtualenv. This allows you to call python scripts from the command line and have the right python interpreter invoked. Take a look at the source -- it's incredibly simple but the best way I've found to handle conditional association of a file extension.

Main Commands
-------------
``mkvirtualenv ``
Create a new virtualenv environment named **. The environment will
be created in WORKON_HOME.

``lsvirtualenv``
List all of the enviornments stored in WORKON_HOME.

``rmvirtualenv ``
Remove the environment **. Uses ``folder_delete.bat``.

``workon []``
If ** is specified, activate the environment named ** (change
the working virtualenv to **). If a project directory has been defined,
we will change into it.
If no argument is specified, list the available environments.

``deactivate``
Deactivate the working virtualenv and switch back to the default system
Python.

``add2virtualenv ``
If a virtualenv environment is active, appends ** to
``virtualenv_path_extensions.pth`` inside the environment's site-packages,
which effectively adds ** to the environment's PYTHONPATH.
If a virtualenv environment is not active, appends ** to
``virtualenv_path_extensions.pth`` inside the default Python's
site-packages.

Convenience Commands
--------------------
``cdproject``
If a virtualenv environment is active and a projectdir has been defined,
change the current working directory to active virtualenv's project directory.
``cd-`` will return you to the last directory you were in before calling
``cdproject``.

``cdsitepackages``
If a virtualenv environment is active, change the current working
directory to the active virtualenv's site-packages directory. If
a virtualenv environment is not active, change the current working
directory to the default Python's site-packages directory. ``cd-``
will return you to the last directory you were in before calling
``cdsitepackages``.

``cdvirtualenv``
If a virtualenv environment is active, change the current working
directory to the active virtualenv base directory. If a virtualenv
environment is not active, change the current working directory to
the base directory of the default Python. ``cd-`` will return you
to the last directory you were in before calling ``cdvirtualenv``.

``lssitepackages``
If a virtualenv environment is active, list that environment's
site-packages. If a virtualenv environment is not active, list the
default Python's site-packages. Output includes a basic listing of
the site-packages directory, the contents of easy-install.pth,
and the contents of virtualenv_path_extensions.pth (used by
``add2virtualenv``).

``setprojectdir ``
If a virtualenv environment is active, define ** as project
directory containing the source code. This allows the use of ``cdproject``
to change the working directory. In addition, the directory will be
added to the environment using ``add2virtualenv``.

``toggleglobalsitepackages``
If a virtualenv environment is active, toggle between having the
global site-packages in the PYTHONPATH or just the virtualenv's
site-packages.

Metadata

Release files for virtualenvwrapper-win 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for virtualenvwrapper-win 1.0.6
File Size Uploaded
virtualenvwrapper-win-1.0.6.zip 14.7 kB Details

Release files / virtualenvwrapper-win-1.0.6.zip

Download URL virtualenvwrapper-win-1.0.6.zip
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cb5ab82e555e9ed0a3b72af13c347a8d9d1b697868b48a8dfb2c3467eab5f97f
BLAKE2b-256 checksum
How to use checksums
34f13931faf87e86e25ed58c27c0e1b99a105941ef2032df1be7236aa5dfb6dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

1 release file

1.2.0

1 release file

1.1.7

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

This release

1.0.6 This release

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page