NVIDIA CUDA Toolkit (PyPI meta-package)

13.2.0 · active · verified Thu Apr 09

The `cuda-toolkit` meta-package on PyPI facilitates the installation of NVIDIA CUDA runtime libraries and their dependencies (like cuBLAS, cuDNN) for Python environments. It doesn't provide direct Python APIs but serves as an underlying dependency for deep learning frameworks like PyTorch and TensorFlow to leverage NVIDIA GPUs. The current version is 13.2.0, with updates generally aligning with NVIDIA's main CUDA Toolkit releases, typically a few times per year.

Warnings

Install

Imports

Quickstart

Since `cuda-toolkit` itself has no Python API, a quickstart demonstrates how a common library like PyTorch leverages the installed CUDA libraries. This snippet checks for CUDA availability and prints device information.

import torch

if torch.cuda.is_available():
    print(f"CUDA is available! Device name: {torch.cuda.get_device_name(0)}")
    print(f"CUDA version: {torch.version.cuda}")
    print(f"PyTorch CUDA version: {torch.cuda.get_device_capability(0)}")
else:
    print("CUDA is NOT available. Check your NVIDIA drivers and cuda-toolkit installation.")

view raw JSON →