Using the Python Package Manager

The recommended way to get VUnit is to install the latest stable release via pip:

> pip install vunit_hdl

Once installed, VUnit may be updated to new versions via a similar method:

> pip install -U vunit_hdl

Using the Development Version

Start by cloning our GIT repository on GitHub:

git clone --recursive

The --recursive option initializes OSVVM which is included as a submodule in the VUnit repository.

To be able to import VUnit in your script you need to make it visible to Python or else the following error occurs.

Traceback (most recent call last):
   File "", line 2, in <module>
     from vunit import VUnit
ImportError: No module named vunit

There are three methods to make VUnit importable in your script.:

  1. Install it in your Python environment using:

    > python install
  2. Set the PYTHONPATH environment variable to include the path to the VUnit repository root directory. Note that you shouldn’t point to the vunit directory within the root directory.

  3. Add the following to your file before the import vunit statement:

    import sys
    import vunit

For VUnit Developers

For those interested in development of VUnit, it is best to install VUnit so that the sources from git are installed in-place instead of to the Python site-packages directory. This can be achieved by using the -e flag with pip, or the develop option with, or setting the PYTHONPATH environment variable.

> git clone
> cd vunit

> python develop
> pip install -e .

By installing VUnit in this manner, the git sources can be edited directly in your workspace while the VUnit package is still globally available in your Python environment.