Installing the Development Version

Note

If you want to follow the instructions on this page, make sure you are reading its latest version.

Once you install the development version, you should keep reading the matching documentation.

The development version of cocotb has different prerequisites than the stable version (see below). Namely, it requires the Python development headers and a C/C++ compiler.

  • Python 3.6+

  • Python development packages

  • GCC 4.8.1+, Clang 3.3+ or Microsoft Visual C++ 14.21+ and associated development packages

  • On Linux: A static build of the C++ standard library libstdc++. Some distributions include the static library in their default packages (e.g. Debian/Ubuntu), others (e.g. Red Hat) require the installation of a package typically named libstdc++-static.

  • GNU Make

  • A Verilog or VHDL simulator, depending on your RTL source code

The installation instructions vary depending on your operating system:

conda install -c msys2 m2-base m2-make

The development version of cocotb can be installed by running

pip install git+https://github.com/cocotb/cocotb@master

Note

If your user does not have permissions to install cocotb using the instructions above, try adding the --user option to pip (see the pip documentation).

Warning

pip may belong to a different Python installation to what you expect. Use pip -V to check. If this prints “(python 2.7)”, use pip3 or python3 -m pip in place of pip in the command shown.

After installation, you should be able to execute cocotb-config. If it is not found, you need to append its location to the PATH environment variable. This may happen when you use the --user option to pip.