At the moment, only Unix based systems are supported.


In addition to an MPI implementation (e.g. MPICH or Open MPI), the pyCTQW.MPI module depends on the following components:

Installation using pip

After ensuring NumPy and petsc4py are installed (and all PETSc, SLEPc and MPI environment variables are properly set), pyctqw can be installed using pip:

$ pip install pyCTQW


The current development version pyCTQW-dev can also be installed using pip:

$ pip install --allow-unverified pyCTQW pyCTQW==dev

Installing pyCTQW.MPI from source code

Alternatively, the source code can be downloaded and compiled manually:

  1. Download the latest version of pyctqw, extract the pyCTQW archive, and cd into the extracted directory:

    $ wget -O pyctqw-1.1.0.tar.gz
    $ tar xzvf pyctqw-1.1.0.tar.gz
    $ cd pyctqw-1.1.0
  2. Ensure that your PETSc and SLEPc environment variables are correctly set; for example,

    $ export PETSC_DIR=/path/to/petsc
    $ export PETSC_ARCH=linux-gnu
    $ export SLEPC_DIR=/path/to/slepc

    If you are unsure what your PETSc or SLEPc variables should be, please refer to their documentation.


    If you plan to install pyCTQW.MPI using root to a system directory, the PETSc and SLEPc environment variables must be available to the root user.

  3. Compile the Python module pyCTQW.MPI by running

    $ python build
  4. System-wide install:

    $ sudo -E python install

    where the command -E ensures that the environment variables set in step 3 are passed to the root.


    If you do not have root access, or the above command does not appear to work, you can install the package locally by running

    $ python install --user

    Now, have a go running some of the Examples!

Optional: build documentation

If Sphinx is installed, the documentation can be compiled by running

$ pip install -r docs/requirements.txt
$ make docs

Known Issues

  • Non-mpi fallback modes not present yet