The `nvidia-cuda-runtime-cu11` package provides the native CUDA Runtime libraries for Python applications. It acts as a foundational component, offering Cython/Python wrappers for CUDA driver and runtime APIs, enabling higher-level Python libraries to leverage NVIDIA GPUs. This is a low-level runtime dependency rather than a library with direct user-facing Python APIs. The current version is 11.8.89. It is actively maintained by NVIDIA.
pip install nvidia-pyindex && pip install nvidia-cuda-runtime-cu11No compatibility data collected yet for this library.
This package doesn't expose direct Python classes or functions for general use. Its presence enables other CUDA-aware Python libraries (like PyTorch or TensorFlow) to utilize the GPU. This quickstart demonstrates how to verify CUDA availability using PyTorch, a common library that depends on CUDA runtime libraries.
Do not attempt to 'import nvidia_cuda_runtime_cu11' for direct programming. Instead, rely on higher-level libraries built on CUDA Python.
Ensure `pip install nvidia-pyindex` is run before installing `nvidia-cuda-runtime-cu11`, or use `--extra-index-url https://pypi.ngc.nvidia.com` during installation.
Verify your system has a CUDA-capable NVIDIA GPU and the correct driver version is installed and up-to-date for your CUDA toolkit version.
For development workflows requiring CUDA compilers or other tools, install the full NVIDIA CUDA Toolkit from the official NVIDIA developer website alongside these runtime Python packages.
Aim for a consistent CUDA environment. If using PyPI wheels, be mindful of how they interact with existing system or Conda CUDA installations. Consider using virtual environments.
Ensure the NVIDIA CUDA Toolkit is properly installed and that its `lib64` directory (e.g., `/usr/local/cuda/lib64` or equivalent for your CUDA version) is included in your `LD_LIBRARY_PATH` environment variable. For example: `export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH` (add this to your shell profile like `.bashrc` for persistence).
Verify that your system has an NVIDIA GPU, ensure the latest NVIDIA GPU drivers are installed and up-to-date, and confirm that the CUDA Toolkit version installed is compatible with your GPU drivers by checking `nvidia-smi` and `nvcc --version`.
Locate the `libcudart.so` file on your system (e.g., using `find / -name libcudart.so 2>/dev/null`) and add its containing directory to your `LD_LIBRARY_PATH` environment variable. If using a Conda environment, ensure `cudatoolkit` of the appropriate version is installed within that environment.
Install the package by specifying the NVIDIA Python Package Index as an extra index URL: `pip install --extra-index-url https://pypi.nvidia.com nvidia-cuda-runtime-cu11`. Alternatively, first install `nvidia-pyindex` which configures pip to use the NVIDIA index.