{"id":27189,"library":"nvidia-cuda-crt","title":"nvidia-cuda-crt","description":"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.","status":"active","version":"13.2.78","language":"python","source_language":"en","source_url":"https://github.com/NVIDIA/nvidia-cuda-crt","tags":["CUDA","NVIDIA","GPU","runtime","HPC"],"install":[{"cmd":"pip install nvidia-cuda-crt","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Provides runtime compatibility for CUDA 12.x; nvidia-cuda-crt depends on it.","package":"nvidia-cuda-runtime-cu12","optional":false},{"reason":"Required for building extensions using CUDA from Python.","package":"Cython","optional":true}],"imports":[{"note":"Direct import of the nvidia module. No earlier import pattern.","symbol":"cuda_crt","correct":"import nvidia.cuda_crt"},{"note":"Common mistake: forgetting the nvidia namespace prefix.","wrong":"import cuda_crt","symbol":"CUDART","correct":"from nvidia.cuda_crt import CUDART"}],"quickstart":{"code":"import os\nfrom nvidia.cuda_crt import CUDART\n\n# Check CUDA runtime version\n# Requires CUDA environment to be set up\nprint(CUDART.get_version())\n","lang":"python","description":"Verify CUDA runtime is available and check version."},"warnings":[{"fix":"Upgrade to CUDA Toolkit 13 and use Python >=3.","message":"Version 13.x dropped support for Python 2.x and older CUDA toolkits. Ensure your CUDA driver and toolkit are compatible with CUDA 13.","severity":"breaking","affected_versions":">=13.0.0"},{"fix":"Install nvidia-cuda-driver or ensure NVIDIA driver is installed on the system.","message":"This package does not provide the CUDA driver (nvidia-cuda-driver). It only supplies the runtime library. Missing driver will cause runtime errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Create a virtual environment and install only the required nvidia packages.","message":"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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install nvidia-pyindex nvidia-cuda-crt","cause":"Missing nvidia namespace package; nvidia-cuda-crt requires nvidia package or nvidia-pyindex.","error":"ModuleNotFoundError: No module named 'nvidia'"},{"fix":"Install NVIDIA driver and set LD_LIBRARY_PATH to include /usr/local/cuda/lib64 or /usr/lib/x86_64-linux-gnu/","cause":"CUDA driver not installed or not in LD_LIBRARY_PATH.","error":"ImportError: libcuda.so.1: cannot open shared object file"},{"fix":"pip install --upgrade nvidia-cuda-crt to 13.2.78 or later.","cause":"Incorrect version of nvidia-cuda-crt; older versions don't export CUDART directly.","error":"AttributeError: module 'nvidia.cuda_crt' has no attribute 'CUDART'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}