Installation guide

Myokit runs on Python (2.7 or 3.5+), is pip-installable and requires the CVODE library to be installed. For more detailed instructions, see below:

If you're planning to use OpenCL for multi-cellular simulations, you might want to consult the OpenCL installation hints given below.

Solving installation issues

There are a few Myokit tricks that can help debug common installation problems. To get an overview of the dependencies Myokit detects on the system, use

$ python3 -m myokit system
To see which compiler Myokit detects, use
$ python3 -m myokit compiler
To see which Sundials version can be found, use
$ python3 -m myokit sundials
Finally, to get information about the OpenCL devices and drivers detected, use
$ python3 -m myokit opencl
Note: If you are using Python 2.7, please use the python command instead of python3.

Configuration files

Myokit stores user-specific settings in configuration files using the extension .ini. These files are located in ~/.config/myokit, where ~ denotes the user home directory. (When using WinPython, this might be WinPython\settings\.config\myokit).

Single-cell simulations

Single-cell simulations in Myokit are run using the CVODE integrator from Sundials. On most linux systems, this can be installed through a package manager. If you have installed Sundials, but Myokit has trouble finding its header files (with filenames ending in .h), please check the paths specified in myokit.ini (see above ).

If you get an error saying the shared libraries can't be found, please check your LD settings on Linux and Mac or your Path environment variable on Windows.

For more help, contact Michael Clerx ( or use the issues page.

Multi-cell simulations with OpenCL

The installation procedure for OpenCL is specific to the used hardware and operating system. In general, you'll need to install two things:

  1. An OpenCL implementation. Different implementations are available from different vendors, usually bundled as an SDK.
  2. An OpenCL supporting driver for the hardware you want to run the code on (Modern drivers tend to support OpenCL already, so you might be able to skip this step).

OpenCL drivers are specific to the device (CPU or GPU) you're using. It is possible to install drivers for several devices side by side. OpenCL implementations are device independent, and you can use the version supplied by any vendor.

For details on installing OpenCL, check with the vendor of your hardware.

Once OpenCL has been installed, Myokit will need to know where it can find the required binaries and header files. The standard configuration files makes a few common guesses, but if Myokit says it cannot find CL/cl.h, you'll need to check the paths given in myokit.ini (see above ).

To see if Myokit can detect the OpenCL drivers and devices, use

$ python3 -m myokit opencl
If that works, you can select the "platform" (OpenCL software implementation) and device to execute on using
$ python3 -m myokit opencl-select

If you get errors saying the shared libraries cannot be found, please check your LD settings on Linux and Mac or the environment variable Path on Windows.

For more help, contact Michael Clerx ( or checkout out the issues page.

Using Myokit as a library

Myokit can be used as a Python library, simply by importing the myokit module.