Installation

Overview

This guide provides comprehensive instructions for installing Kaira on your system. Kaira is designed to work across multiple platforms with minimal setup required.

Prerequisites

  • Python 3.8 or higher

  • pip (Python package installer)

  • (Optional) CUDA-compatible GPU for accelerated processing

Installation Methods

Quick Installation

The fastest way to install Kaira is directly from PyPI:

pip install pykaira

From Source

For the latest features or contributions, install from source:

  1. Clone the repository:

    git clone https://github.com/ipc-lab/kaira.git
    cd kaira
    
  2. Install the package:

    pip install .
    

System-Specific Notes

Windows

  • You may need to run the Command Prompt or PowerShell as administrator

  • If you encounter path issues, ensure Python is added to your PATH environment variable

macOS

  • You may need to use python3 explicitly instead of python

  • Some users may need to install XCode command line tools first: xcode-select --install

Linux

  • Ensure you have the required build tools: sudo apt-get install build-essential python3-dev (Ubuntu/Debian)

GPU Acceleration

Kaira automatically detects and utilizes available CUDA-compatible GPUs. For GPU support, you need:

  1. Installed the appropriate NVIDIA drivers for your GPU

  2. Installed a compatible version of CUDA Toolkit

  3. Properly set up your system environment variables

  4. PyTorch with GPU support

To install Kaira with GPU support, we recommend following the PyTorch installation instructions first to ensure proper CUDA compatibility:

# Check PyTorch website for the specific command for your system and CUDA version
# https://pytorch.org/get-started/locally/
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118  # Example for CUDA 11.8

# Then install Kaira
pip install pykaira

For more details on PyTorch GPU configuration, please refer to the PyTorch documentation.

No additional Kaira-specific installation commands are required for GPU support as it’s included in the main package.

Verifying Installation

Confirm your installation is working correctly:

python -c "import kaira; print(f'Kaira version {kaira.__version__} successfully installed')"

This should display your installed version without any errors.

Troubleshooting

Common Issues:

  • “ImportError: No module named kaira”: Make sure your virtual environment is activated or reinstall using pip install --force-reinstall pykaira

  • Permission errors: Use pip install --user pykaira or create a virtual environment

  • Dependency conflicts: Try installing in a fresh virtual environment

  • GPU not detected: Verify your CUDA installation with python -c "import torch; print(torch.cuda.is_available())"

For more help, see our Frequently Asked Questions or join our community forum.

Uninstallation

If you need to remove Kaira:

pip uninstall pykaira