Linux installation guide

To install on a linux based system, you need Python and PIP (usually already installed), GCC (usually already installed), and CVODE (usually available via a package manager).

Specific instructions for Fedora and Ubuntu are given below.

Installing Myokit

On Fedora:

$ dnf install sundials-devel
$ dnf install python3-pip python3-devel
$ dnf install python3-scipy python3-sympy
$ dnf install python3-lxml
$ dnf install python3-qt5 python3-matplotlib-qt5
$ pip3 install myokit
On Ubuntu:
$ apt-get install libsundials-dev
$ apt-get install python3-pip python3-dev
$ apt-get install python3-scipy python3-sympy
$ apt-get install python3-lxml
$ apt-get install python3-pyqt5 python3-matplotlib
$ pip3 install myokit
On OpenSUSE, follow the instructions to add the science repository, and then run
$ zypper in sundials-devel
$ zypper in python3-pip python3-devel
$ zypper in python3-scipy python3-sympy
$ zypper in python3-lxml
$ zypper in python3-PyQt5 python3-matplotlib
$ zypper in gcc gcc-c++
$ pip3 install myokit

To upgrade an existing Myokit installation, use

$ pip3 install --upgrade myokit

Icons for Gnome/KDE

To add menu items on Gnome/KDE, run

$ myokit icons

Ubuntu OpenCL support for Intel GPUs

On recent versions of Ubuntu, you can add support for GPU simulation on Intel GPUs (not CPUs!) by adding the packages:

$ apt-get install ocl-icd-libopencl1 ocl-icd-opencl-dev
$ apt-get install opencl-headers beignet

Installing dependencies via PIP

If you prefer using PIP over your native package manager (for example when installing into a virtual environment), you can skip the steps above (except for the sundials bit), and simply use one of

$ pip3 install myokit
$ pip3 install myokit[pyqt]
$ pip3 install myokit[pyside]
which will install Myokit, and either PyQt5 (with the `pyqt` option) or PySide2 (with the `pyside` option).

Dependencies

The following components are required to run Myokit:

A recent version of Python 2, or 3

These are usually pre-installed on Linux systems.

The PIP package manager for python.

Typically obtained via a package manager such as dnf or apt, see above.

Sundials 2.4 or higher (CVODE 2.6 or higher)

The Sundials CVODE solver is required to run simulations. Version 2.4 (or higher) of the Sundials Suite is required. It is possible to install only the CVODE solver, not the full library. The version of CVODE included in the 2.4 suite is CVODE 2.6.

On many systems, a recent version of Sundials is available through some package manager, e.g. apt, yum, dnf, macports. See below for platform-specific info.

If compiling Sundials from the source, make sure to include the "shared libraries" (.so or .dll files) by adding the --enable-shared switch to configure before compiling.

Note: Python and sundials should be compiled for the same architecture: A 64 bit python installation will require a 64 bit Sundials install.

OpenCL drivers and libraries (optional)
Myokit can use OpenCL to run parallelized simulations either on a CPU or a GPU. For this to work, you need to install:
  1. OpenCL-compatible drivers for the device you want to run on. These can typically be downloaded from the manufacturer's homepage.
  2. A copy of the OpenCL libraries. Some implementations of these libraries can work with devices from different vendors. To be safe, try downloading a version distributed by the manufacturer of the intended device (i.e. your CPU or GPU).