================================== Installation ================================== .. note:: At the moment, only Unix based systems are supported. Dependencies ============ In addition to an MPI implementation (e.g. `MPICH `_ or `Open MPI `_), the :py:mod:`pyCTQW.MPI` module depends on the following components: - `Python `_ >= 2.7 - `NumPy `_ >= 1.6.0 - `PETSc `_ >= 3.4.2 - `SLEPc `_ >= 3.4.1 - `petsc4py 3.4 or petsc4py-dev `_ - `mpi4py `_ (recommended, used for some plotting) - `matplotlib `_ (recommended, for node plotting and graph visualisation) - `SciPy `_ (recommended, for some I/O operations) - `NetworkX `_ (recommended, graph visualisation) Installation using `pip` =========================== After ensuring NumPy and petsc4py are installed (and all PETSc, SLEPc and MPI environment variables are properly set), :mod:`pyctqw` can be installed using `pip`: .. code-block:: bash $ pip install pyCTQW .. note:: The current development version `pyCTQW-dev `_ can also be installed using `pip`: .. code-block:: bash $ pip install --allow-unverified pyCTQW pyCTQW==dev Installing :py:mod:`pyCTQW.MPI` from source code ================================================= Alternatively, the source code can be downloaded and compiled manually: 1) :doc:`Download ` the latest version of :mod:`pyctqw`, extract the :mod:`pyCTQW` archive, and ``cd`` into the extracted directory: .. code-block:: bash $ wget https://github.com/josh146/pyctqw/archive/1.1.0.tar.gz -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, .. code-block:: bash $ 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. .. important:: If you plan to install :py:mod:`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 :py:mod:`pyCTQW.MPI` by running .. code-block:: bash $ python setup.py build 4) System-wide install: .. code-block:: bash $ sudo -E python setup.py install where the command ``-E`` ensures that the environment variables set in step 3 are passed to the root. .. note:: If you do not have root access, or the above command does not appear to work, you can install the package locally by running .. code-block:: bash $ python setup.py install --user Now, have a go running some of the :doc:`examples`! **Optional:** build documentation ======================================= If `Sphinx `_ is installed, the documentation can be compiled by running .. code-block:: bash $ pip install -r docs/requirements.txt $ make docs Known Issues ============== * Non-mpi fallback modes not present yet