Requirements and Installation

Ubuntu 18.04

CubiCal depends on python-casacore, the dependencies of which should be installed from the KERN-5 ppa. The ppa can be added as follows:

sudo apt install software-properties-common
sudo add-apt-repository -s ppa:kernsuite/kern-5
sudo apt-add-repository multiverse
sudo apt-add-repository restricted
sudo apt update

Once the ppa has been added, CubiCal’s dependencies can be installed as follows:

                      casacore-data \
                      build-essential \
                      python3-pip \
                      libboost-all-dev \
                      wcslib-dev \
                      git \
sudo apt install -y $CUBICAL_DEPENDENCIES


A known casacore bug can cause data corruption on large reads. If your use-case falls in this category, please build and install casacore from source.

If you wish to install CubiCal in a virtual environment (recommended), see Using a virtual environment.

CubiCal can be installed by running the following:

pip3 install git+


CubiCal can predict model visiblities using Montblanc, but it is not installed by default. To install CubiCal with Montblanc, run:

pip3 install "cubical[lsm-support]@git+"


To install in development mode, assuming that you have already cloned the repository, run:

pip3 install -e path/to/repo/

If you require Montblanc, run:

pip3 install -e path/to/repo/"[lsm-support]"

Using a virtual environment

Installing CubiCal in a virtual enviroment is highly recommended. To install virtualenv using apt, run:

sudo apt install python3-virtualenv

To create a virtualenv, run:

virtualenv -p python3 path/to/env/name

Activate the environment using:

source path/to/env/name/bin/activate

This should change the command line prompt to be consistent with the virtualenv name.

It is often necessary to update pip, setuptools and wheel inside the environment:

pip3 install -U pip setuptools wheel