Skip to main content

Installation

The Python package is named vajra-streamer, but the import package is vajra.

pip install vajra-streamer

Requirements

RequirementValue
Python>=3.8
PyTorchtorch>=2.0.0
CUDARequired
Native librarylibvajra.so on Linux or libvajra.dylib on macOS

The package returns CUDA tensors, so a CPU-only PyTorch install is not enough.

Native Library Placement

The Python package loads libvajra with ctypes. When installed from a wheel, the native library should be bundled inside the vajra/ package directory.

For local development, place the compiled library in one of these locations:

python/vajra/libvajra.so
python/libvajra.so
libvajra.so

On macOS, use libvajra.dylib instead of libvajra.so.

Local Editable Install

From the repository root:

cp libvajra.so python/vajra/
cd python
pip install -e .

Import Check

from vajra import VajraStreamer, StreamConfig

If this import raises OSError, Python found the package but could not load the native library. Check that libvajra.so or libvajra.dylib is present in one of the search locations above.