1. Installation#

1.1. Installation instructions#

Reflectorch can be installed directly from the Python Packaging Index (PyPI) via the Python package installer pip. It is recommended to install the package in a virtual environment to avoid dependency conflicts and maintain a clean Python environment.

pip install reflectorch

Additionally, one can clone the entire Github repository and install the package in editable mode:

git clone https://github.com/schreiber-lab/reflectorch.git
cd reflectorch
pip install -e .

For development purposes, the package can be installed together with the optional dependencies for building the distribution, testing and documentation:

git clone https://github.com/schreiber-lab/reflectorch.git
pip install -e .[tests,docs,build]

1.1.1. GPU support#

By default, installing Reflectorch via pip will install the CPU-only version of Pytorch. This is suitable for users without dedicated GPU hardware. If you have an NVIDIA GPU and want to leverage CUDA acceleration, you should manually install the appropriate CUDA-enabled version of Pytorch before installing Reflectorch. Refer to the official PyTorch installation guide to select the correct command based on your system’s CUDA version and operating system.

1.2. Package dependencies#

The package was tested for Python versions which are 3.7 or newer. The package has the following core dependencies, which are listed in pyproject.toml and installed automatically together with the package.

  • numpy

  • torch

  • scipy

  • tqdm

  • PyYAML

  • click

  • matplotlib

  • ipywidgets

  • huggingface_hub

  • safetensors

  • tensorboard