Registry / ai-ml / nvidia-cuda-runtime-cu11

nvidia-cuda-runtime-cu11

JSON →
library11.8.89pypypiunverified

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-cu11
INSTALL
IMPORT
SIG · NVIDIA-CUDA-RUNTIM
N
nvidia-cuda-runtime-cu11
ai-mlpythonv11.8.89
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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.

import os # This package primarily provides runtime libraries. # To verify successful installation and CUDA availability in a Python environment, # you typically check via a framework that utilizes CUDA, like PyTorch. # Ensure 'torch' is installed (e.g., pip install torch --index-url https://download.pytorch.org/whl/cu118) try: import torch if torch.cuda.is_available(): print(f"CUDA is available! Device name: {torch.cuda.get_device_name(0)}") else: print("CUDA is not available according to PyTorch.") except ImportError: print("PyTorch not installed. Install it to verify CUDA availability:") print("pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118") except Exception as e: print(f"An error occurred while checking CUDA with PyTorch: {e}")
Debug
Known issues
gotchaThis package is a low-level runtime dependency. It does not provide direct Python APIs for coding. Its primary function is to make the CUDA Runtime libraries available for other Python frameworks (e.g., PyTorch, TensorFlow, Numba) that perform GPU-accelerated computing.
fix
Do not attempt to 'import nvidia_cuda_runtime_cu11' for direct programming. Instead, rely on higher-level libraries built on CUDA Python.
affects: All
breakingInstalling `nvidia-cuda-runtime-cu11` (and other `nvidia-cuda-*` packages) from PyPI requires the `nvidia-pyindex` package to be installed first, or specifying the NVIDIA PyPI index URL. Without it, `pip` may fail to find the package.
fix
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.
affects: All
gotchaA compatible NVIDIA GPU and an appropriately installed NVIDIA driver are prerequisites. This Python package only provides the software runtime; it does not install the GPU driver or ensure hardware compatibility.
fix
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.
affects: All
gotchaThese PyPI packages (`nvidia-cuda-runtime-cu11`, etc.) are intended for runtime use and do not include developer tools such as `nvcc` (the CUDA compiler). For CUDA development (e.g., compiling custom CUDA kernels), the full CUDA Toolkit installation is typically required.
fix
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.
affects: All
gotchaMixing CUDA versions from different installation methods (e.g., system-wide CUDA Toolkit, Conda, and PyPI wheels) can lead to environment conflicts and unexpected errors.
fix
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.
affects: All
Errors
Common errors & fixes
Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
The system cannot find the `libcudart.so` shared library, which is a critical component of the CUDA Runtime Toolkit, either because the CUDA Toolkit is not installed, or its path is not correctly set in the `LD_LIBRARY_PATH` environment variable on Linux systems.
fix
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).
RuntimeError: CUDA error: no CUDA-capable device is detected
This error occurs when a Python application attempts to use CUDA for GPU acceleration but cannot detect a compatible NVIDIA GPU, or the installed NVIDIA GPU drivers are outdated, corrupted, or incompatible with the CUDA Toolkit version.
fix
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`.
CUDA SETUP: Problem: The main issue seems to be that the main CUDA runtime library was not detected.
A Python library (often a deep learning framework or a CUDA-dependent utility) is unable to locate the primary CUDA runtime library (`libcudart.so`) required for GPU operations within the current environment's search paths.
fix
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.
RuntimeError: ########################################################################################### The package you are trying to install is only a placeholder project on PyPI.org repository. This package is hosted on NVIDIA Python Package Index.
Many NVIDIA-specific Python packages, including `nvidia-cuda-runtime-cu11` and its companion libraries, are hosted on NVIDIA's dedicated Python Package Index (pypi.nvidia.com) rather than the default PyPI.org. Attempting to install them directly from PyPI.org results in finding a placeholder package.
fix
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.
Upgrade
Version history
11.8.89latest on PyPI · released Oct 3, 2022
Audit
Dependencies
nvidia-pyindexrequiredRequired for PyPI to fetch additional NVIDIA Python modules.
Agent activity
3 hits · last 30 days
node
2
Resources
nvidia-cuda-runtime-cu11 — pip install nvidia-cuda-runtime-cu11 · libregistry