Installation

From package managers (Recommmended)

pyclesperanto is available on PyPI and conda-forge. We recommend installing it from one of these package managers.

Install from conda-forge with conda or mamba:

Install from PyPI with pip:

pip install pyclesperanto

Install from conda-forge with conda or mamba:

conda install -c conda-forge pyclesperanto

Important

Installing pyclesperanto with mamba or conda on MacOS or Linux will require an additional package to be installed to see compatible OpenCL platforms.

conda install -c conda-forge ocl_icd_wrapper_apple
conda install -c conda-forge ocl-icd-system

Tip

It is strongly advised to install pyclesperanto in a virtual environment. For example, you can create a new environment with conda:

conda create -n myenv
conda activate myenv

From source

For Development, or if you are using a platform not supported by the package managers, you can install pyclesperanto from source. This process will requires you to have a C/C++ compiler available on your system. Similarly to installing pyclesperanto from the package managers, it is recommended to install it in a virtual environment.

Clone the repository using git and install it with pip. The installation can take a few minutes to complete.

git clone https://github.com/clEsperanto/pyclesperanto.git
cd pyclesperanto
pip install -e .

Tip

You can add the flag -v to enable verbose output of the build process. This is particularly useful for debugging and providing build logs when reporting issues.

Note

Installing from source is particularly useful if you want to contribute to the package, or if you want to use the package on a non-supported platform (e.g. like Arch Linux)