Installation

Note

The parallelproj package consists of a C/OpenMP (libparallelproj_c) projection library, a CUDA (libparallelproj_cuda) projection library, and a python interface module (parallelproj). We highly recommend to install parallelproj and pre-compiled versions of the libraries and the python interface from conda-forge. which are available for all major operating system (with and without CUDA).

Tip

You can get the miniforge conda install (minimal conda installer specific to conda-forge) here. As usual, we recommend to install parallelproj into a separate virtual environment.

To install parallelproj (and the required compiled libraries) from conda-forge, run

$ mamba install parallelproj
$ conda install -c conda-forge parallelproj

Tip

parallelproj can not only project numpy CPU arrays, but also cupy GPU arrays (no memory transfer between host and GPU needed). To enable the latter, you have to install the cupy package as well.

To install parallelproj and cupy (optional and only if you have a CUDA GPU) from conda-forge, run

$ mamba install parallelproj cupy
$ conda install -c conda-forge parallelproj cupy

Note

On conda-forge, CPU, CUDA 11 and CUDA 12 builds of libparallelproj are availalbe. conda / mamba should automatically install the correct version on your local CUDA system. Nevertheless, you can explicitly specify the CUDA version by adding the package cuda-version=11.X or cuda-version=12.X to the install command.

Tip

parallelproj can also project pytorch CPU and GPU tensors

To install parallelproj and pytorch (optional) from conda-forge, run

$ mamba install parallelproj pytorch cupy
$ mamba install parallelproj pytorch
$ conda install -c conda-forge parallelproj pytorch cupy
$ conda install -c conda-forge parallelproj pytorch

Note that in case you want to use parallelproj with pytorch GPU tensors, cupy must be installed next to pytorch as well, as shown in tabs above.

Note

In case you are interested in the compiled projection libraries, but not in the python interface, you can install the libparallelproj package from conda-forge.

$ mamba install libparallelproj
$ conda install -c conda-forge libparallelproj