nvidia-cuda-crt
raw JSON → 13.2.78 verified Fri May 01 auth: no python
NVIDIA CUDA C Runtime library for Python, distributed as a PyPI package. Version 13.2.78 requires Python >=3. This package provides the CUDA runtime (CRT) as a shared library, enabling GPU-accelerated computations. It is part of the nvidia-pyindex ecosystem and typically installed automatically with CUDA toolkits. Release cadence follows CUDA toolkit releases.
pip install nvidia-cuda-crt Common errors
error ModuleNotFoundError: No module named 'nvidia' ↓
cause Missing nvidia namespace package; nvidia-cuda-crt requires nvidia package or nvidia-pyindex.
fix
pip install nvidia-pyindex nvidia-cuda-crt
error ImportError: libcuda.so.1: cannot open shared object file ↓
cause CUDA driver not installed or not in LD_LIBRARY_PATH.
fix
Install NVIDIA driver and set LD_LIBRARY_PATH to include /usr/local/cuda/lib64 or /usr/lib/x86_64-linux-gnu/
error AttributeError: module 'nvidia.cuda_crt' has no attribute 'CUDART' ↓
cause Incorrect version of nvidia-cuda-crt; older versions don't export CUDART directly.
fix
pip install --upgrade nvidia-cuda-crt to 13.2.78 or later.
Warnings
breaking Version 13.x dropped support for Python 2.x and older CUDA toolkits. Ensure your CUDA driver and toolkit are compatible with CUDA 13. ↓
fix Upgrade to CUDA Toolkit 13 and use Python >=3.
gotcha This package does not provide the CUDA driver (nvidia-cuda-driver). It only supplies the runtime library. Missing driver will cause runtime errors. ↓
fix Install nvidia-cuda-driver or ensure NVIDIA driver is installed on the system.
gotcha On some systems, the nvidia-cuda-crt package may conflict with system-installed CUDA or other nvidia packages. Use pip install in a virtual environment. ↓
fix Create a virtual environment and install only the required nvidia packages.
Imports
- cuda_crt
import nvidia.cuda_crt - CUDART wrong
import cuda_crtcorrectfrom nvidia.cuda_crt import CUDART
Quickstart
import os
from nvidia.cuda_crt import CUDART
# Check CUDA runtime version
# Requires CUDA environment to be set up
print(CUDART.get_version())