Refer to the pip development documentation - it applies equally to virtualenv, except that virtualenv issues should be filed on the virtualenv repo at GitHub.

Virtualenv’s release schedule is tied to pip’s – each time there’s a new pip release, there will be a new virtualenv release that bundles the new version of pip.

Files in the virtualenv_embedded/ subdirectory are embedded into itself as base64-encoded strings (in order to support single-file use of without installing it). If your patch changes any file in virtualenv_embedded/, run bin/ to update the embedded version of that file in; commit that and submit it as part of your patch / pull request.

Running the tests

Virtualenv’s test suite is small and not yet at all comprehensive, but we aim to grow it.

The easy way to run tests (handles test dependencies automatically):

$ python test

If you want to run only a selection of the tests, you’ll need to run them directly with pytest instead. Create a virtualenv, and install required packages:

$ pip install pytest mock

Run pytest:

$ pytest

Or select just a single test file to run:

$ pytest tests/test_virtualenv

You can also run the tests using tox which will take care of installing all the necessary requirements into its constructed Python environments. You just need to install tox in your environment using:

$ python -m pip install tox

and then run the tests with a specific Python version using a call like:

$ python -m tox -e python3.6

Run python -m tox -av for a list of all supported Python environments or just run the tests in all of the available ones by running just tox.

Status and License

virtualenv is a successor to workingenv, and an extension of virtual-python.

It was written by Ian Bicking, sponsored by the Open Planning Project and is now maintained by a group of developers. It is licensed under an MIT-style permissive license.