{"id":23121,"library":"libucxx-cu12","title":"libucxx-cu12","description":"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.","status":"active","version":"0.49.0","language":"python","source_language":"en","source_url":"https://github.com/rapidsai/ucxx","tags":["ucx","rapids","cuda","distributed","networking","bindings","cu12"],"install":[{"cmd":"pip install libucxx-cu12","lang":"bash","label":"Install libucxx-cu12 from PyPI"}],"dependencies":[{"reason":"libucxx-cu12 provides Python bindings on top of UCX, but the actual UCX library may be needed.","package":"ucx-py","optional":true}],"imports":[{"note":"libucxx-cu12 is not the direct import; the Python bindings are typically accessed via the 'ucp' package.","wrong":"from libucxx import UCXListener","symbol":"UCXListener","correct":"from ucp import UCXListener"},{"note":"The UCX Python bindings are published as the 'ucp' package.","wrong":"from libucxx import ucp","symbol":"ucp.init","correct":"import ucp"}],"quickstart":{"code":"import ucp\n\nasync def server(ep):\n    msg = await ep.recv(1024)\n    print(f\"Received: {msg}\")\n    await ep.send(b\"pong\")\n\nasync def main():\n    listener = ucp.create_listener(server, port=13337)\n    ep = await ucp.create_endpoint(ucp.get_address(), 13337)\n    await ep.send(b\"ping\")\n    reply = await ep.recv(1024)\n    print(f\"Reply: {reply}\")\n    listener.close()\n\nucp.init()\nucp.get_worker().run()\n","lang":"python","description":"Quickstart example using UCX-Py (the Python bindings). Note: libucxx-cu12 is the CUDA 12 variant; actual usage is via the `ucp` module."},"warnings":[{"fix":"Import as `import ucp`.","message":"The PyPI package name is `libucxx-cu12` but the import is `ucp`. Installing libucxx-cu12 provides the `ucp` Python module.","severity":"gotcha","affected_versions":"all"},{"fix":"If you use numba-cuda with UCX, switch to cuda-core based API.","message":"Version 0.49.0 removed the numba-cuda runtime dependency in favor of cuda-core. Code relying on numba-cuda interop may need updates.","severity":"breaking","affected_versions":">=0.49.0"},{"fix":"Update CUDA to 12.2 or later, or pin to an older libucxx-cu12 version.","message":"Version 0.47.0 requires CUDA 12.2+. Systems with older CUDA will encounter compatibility issues.","severity":"breaking","affected_versions":">=0.47.0"},{"fix":"Ensure you install the correct variant matching your CUDA version.","message":"The package name includes '-cu12' which is specific to CUDA 12. For CUDA 11, use 'libucxx-cu11'.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `import ucp` instead of `import ucxx`.","message":"The `ucp` module is the recommended interface. Some older docs reference `ucxx` directly.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `import ucp` — the package installs the `ucp` module.","cause":"Installed libucxx-cu12 but expected import name differs.","error":"ModuleNotFoundError: No module named 'ucp'"},{"fix":"Install UCX system package (e.g., apt-get install libucx-dev) or set LD_LIBRARY_PATH.","cause":"The underlying UCX system library is missing or not in LD_LIBRARY_PATH.","error":"RuntimeError: UCX library not found"},{"fix":"Install CUDA 12.2+ and ensure LD_LIBRARY_PATH includes CUDA lib64.","cause":"CUDA runtime not found; likely CUDA is not installed or LD_LIBRARY_PATH not set.","error":"ImportError: libcuda.so.1: cannot open shared object file"},{"fix":"Update UCX to version 1.12.0 or higher (e.g., via conda or from source).","cause":"The installed UCX system library is outdated.","error":"AssertionError: UCX version >= 1.12.0 required"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}