Installation

is available for to .

Note

We do not recommend installation as a root user on your system . Please setup a virtual environment, e.g., via Anaconda or Miniconda, or create a Docker image.

Installation via PyPi

You can install and use without any external library required except for PyTorch and Ray.

For this, simply run:

pip install blades

Installation from Source

In case a specific version is not supported by our wheels, you can alternatively install them from source:

  1. Ensure that your CUDA is setup correctly (optional):

    1. Check if is installed with CUDA support:

      python -c "import torch; print(torch.cuda.is_available())"
      >>> True
      
    2. Add CUDA to $PATH and $CPATH (note that your actual CUDA path may vary from /usr/local/cuda):

      export PATH=/usr/local/cuda/bin:$PATH
      echo $PATH
      >>> /usr/local/cuda/bin:...
      
      export CPATH=/usr/local/cuda/include:$CPATH
      echo $CPATH
      >>> /usr/local/cuda/include:...
      
    3. Add CUDA to $LD_LIBRARY_PATH on Linux and to $DYLD_LIBRARY_PATH on macOS (note that your actual CUDA path may vary from /usr/local/cuda):

      export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
      echo $LD_LIBRARY_PATH
      >>> /usr/local/cuda/lib64:...
      
      export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH
      echo $DYLD_LIBRARY_PATH
      >>> /usr/local/cuda/lib:...
      
    4. Verify that nvcc is accessible from terminal:

      nvcc --version
      >>> 11.8
      
    5. Ensure that and system CUDA versions match:

      python -c "import torch; print(torch.version.cuda)"
      >>> 11.8
      
      nvcc --version
      >>> 11.8
      
  2. Install the relevant packages:

    pip install --verbose git+https://github.com/pyg-team/pyg-lib.git
    pip install --verbose torch_scatter
    pip install --verbose torch_sparse
    pip install --verbose torch_cluster
    pip install --verbose torch_spline_conv
    

In rare cases, CUDA or path problems can prevent a successful installation. pip may even signal a successful installation, but execution simply crashes with Segmentation fault (core dumped). We collected common installation errors in the Frequently Asked Questions subsection. In case the FAQ does not help you in solving your problem, please create an issue. Before, please verify that your CUDA is set up correctly by following the official installation guide.