libucxx-cu12
raw JSON → 0.49.0 verified Fri May 01 auth: no python
Python Bindings for the Unified Communication X library (UCX), including CUDA 12 support. Provides high-performance communication primitives for distributed computing, commonly used in RAPIDS ecosystem. Current version: 0.49.0, part of the RAPIDS suite, released monthly.
pip install libucxx-cu12 Common errors
error ModuleNotFoundError: No module named 'ucp' ↓
cause Installed libucxx-cu12 but expected import name differs.
fix
Use
import ucp — the package installs the ucp module. error RuntimeError: UCX library not found ↓
cause The underlying UCX system library is missing or not in LD_LIBRARY_PATH.
fix
Install UCX system package (e.g., apt-get install libucx-dev) or set LD_LIBRARY_PATH.
error ImportError: libcuda.so.1: cannot open shared object file ↓
cause CUDA runtime not found; likely CUDA is not installed or LD_LIBRARY_PATH not set.
fix
Install CUDA 12.2+ and ensure LD_LIBRARY_PATH includes CUDA lib64.
error AssertionError: UCX version >= 1.12.0 required ↓
cause The installed UCX system library is outdated.
fix
Update UCX to version 1.12.0 or higher (e.g., via conda or from source).
Warnings
gotcha The PyPI package name is `libucxx-cu12` but the import is `ucp`. Installing libucxx-cu12 provides the `ucp` Python module. ↓
fix Import as `import ucp`.
breaking Version 0.49.0 removed the numba-cuda runtime dependency in favor of cuda-core. Code relying on numba-cuda interop may need updates. ↓
fix If you use numba-cuda with UCX, switch to cuda-core based API.
breaking Version 0.47.0 requires CUDA 12.2+. Systems with older CUDA will encounter compatibility issues. ↓
fix Update CUDA to 12.2 or later, or pin to an older libucxx-cu12 version.
gotcha The package name includes '-cu12' which is specific to CUDA 12. For CUDA 11, use 'libucxx-cu11'. ↓
fix Ensure you install the correct variant matching your CUDA version.
deprecated The `ucp` module is the recommended interface. Some older docs reference `ucxx` directly. ↓
fix Use `import ucp` instead of `import ucxx`.
Imports
- UCXListener wrong
from libucxx import UCXListenercorrectfrom ucp import UCXListener - ucp.init wrong
from libucxx import ucpcorrectimport ucp
Quickstart
import ucp
async def server(ep):
msg = await ep.recv(1024)
print(f"Received: {msg}")
await ep.send(b"pong")
async def main():
listener = ucp.create_listener(server, port=13337)
ep = await ucp.create_endpoint(ucp.get_address(), 13337)
await ep.send(b"ping")
reply = await ep.recv(1024)
print(f"Reply: {reply}")
listener.close()
ucp.init()
ucp.get_worker().run()