Conda Package

The conda package is recommended. If you already have conda installed just do:

conda config --add channels conda-forge
conda config --add channels jmsgrogan
conda install microvessel-chaste
conda install libgcc

You should then be able to do:

import microvessel_chaste

in a python session.

If you need to install conda, the Miniconda package will suffice.

It may be necessary to run the following if you are starting with a 'clean' version of Ubuntu to install some typical packages:

sudo apt-get install build-essential lsb-release libgl1-mesa-dev:amd64 libxt-dev:amd64 libatlas-base-dev


A Docker image is also available. This image will launch a Jupyter notebook at http://localhost::8888 in a web browser, which can be used to try out the package. If you already have docker installed do:

docker pull jmsgrogan/microvessel-chaste
docker run -it -p 8888:8888 jmsgrogan/microvessel-chaste

and go to the above link in your browser. Alternatively do:

docker pull jmsgrogan/microvessel-chaste
docker run -it jmsgrogan/microvessel-chaste /bin/bash

to get access to the shell and launch Python yourself.

To install Docker follow the instructions here.



Only Docker is supported on these platforms at the moment. Install Docker following the instructions here and proceed as per the Linux Docker instructions above.

Build From Source (Linux) - C++ and Python

It is reasonably straightforward to build the package from source on Linux.

First, Chaste dependencies need to be built following the Chaste Install Guide.

The project only supports the development version of Chaste. This can be obtained by doing:

git clone -b paper/MicrovesselChaste $CHASTE_SOURCE_DIR

The project code itself can be obtained by doing:


The Microvessel project code needs to be included in the main Chaste source. This can be done with a symbolic link:

cd $CHASTE_SOURCE_DIR/projects

The C++ libraries can be built using the Chaste CMake build system. First, create a build directory outside the source tree and proceed as:

make project_MicrovesselChaste -j $NUM_AVAILABLE_CPUS

This will build the C++ library and all tests. To avoid building tests do:

make chaste_project_MicrovesselChaste -j $NUM_AVAILABLE_CPUS

as the final command. The Chaste CMake build system guide should be consulted for options related to generating optimized builds, running other types of test and installation as a system library.

To build the Python library it is neccessary to first build PyChaste, a Python wrapper for Chaste. Do:

cd $CHASTE_SOURCE_DIR/projects
make chaste_project_PyChaste -j $NUM_AVAILABLE_CPUS
make chaste_project_PyChaste_Python -j $NUM_AVAILABLE_CPUS
cd $CHASTE_BUILD_DIR/projects/PyChaste/python/chaste
python install

Similarly, for Microvessel Chaste do:

make project_MicrovesselChaste_Python -j $NUM_AVAILABLE_CPUS
cd $CHASTE_BUILD_DIR/projects/MicrovesselChaste/python/microvessel-chaste
python install

You can then import chaste and microvessel_chaste in a Python session.


  • Missing Boost Python when building from source: If you are building from source you may need to install Boost Python in addition to the Chaste dependencies. Do sudo apt-get install libboost-python-dev on Ubuntu to obtain it.
  • Missing when loading conda package: this is a problem with the version of VTK in conda-forge. Make sure you have added the conda channels in the order above.
  • GCC ABI errors when importing chaste from the conda package. The conda package is built with GCC 5 and needs the corresponding version of libstdc++. This library is easily hidden by the system version or other conda packages. It is suggested that chaste is run in its own conda environment and that the conda 'libgcc' package is installed on its own after chaste.