The `nvidia-curand-cu12` package provides the native runtime libraries for NVIDIA's CUDA Random Number Generation (CURAND) library, specifically compiled for CUDA Toolkit 12.x. It acts as a foundational dependency for higher-level Python libraries that wrap CUDA functionalities, enabling GPU-accelerated random number generation. The current version is 10.3.10.19, and it typically follows the CUDA Toolkit's release cadence.
pip install nvidia-curand-cu12Verified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how a higher-level library like CuPy would utilize the underlying CURAND runtime provided by `nvidia-curand-cu12`. The `nvidia-curand-cu12` package itself does not expose direct Python APIs for import, but rather provides the necessary native libraries for GPU-accelerated random number generation that CuPy (or similar libraries) wrap. Ensure CuPy is installed (`pip install cupy-cuda12x`) and a CUDA-capable GPU is present.
Install a higher-level wrapper library (e.g., `cupy-cuda12x`) to interact with CURAND from Python.
Ensure your system has a supported NVIDIA GPU and the appropriate NVIDIA GPU drivers are installed and up-to-date. Verify CUDA Toolkit is correctly configured.
Use stricter version constraints for `nvidia-*cu12` packages and their dependants, or consider using environment managers like Conda which can sometimes handle these dependencies more robustly.
Ensure all CUDA-dependent libraries and the installed CUDA Toolkit version match the `cu12` designation of this package.
First, install the NVIDIA PyPI index configurator: `pip install nvidia-pyindex`. Then, install this package: `pip install nvidia-curand-cu12`.