Registry / ai-ml / nvidia-cuda-nvcc-cu12

nvidia-cuda-nvcc-cu12

JSON →
library12.9.86pypypi✓ verified 22d ago

The `nvidia-cuda-nvcc-cu12` package provides the NVIDIA CUDA C/C++ compiler (`nvcc`) as a Python wheel for CUDA Toolkit version 12. It enables Python-based build systems and projects (e.g., those using PyTorch, Numba, or CuPy for custom CUDA kernels) to access the `nvcc` executable for compiling CUDA code. This package is part of NVIDIA's initiative to streamline CUDA toolkit component installation via `pip`, aiming for better portability and compatibility within the Python ecosystem. The current version is 12.9.86, and NVIDIA typically updates CUDA versions with new GPU architectures, alongside quarterly minor releases.

pip install nvidia-cuda-nvcc-cu12
INSTALL
IMPORT
SIG · NVIDIA-CUDA-NVCC-C
N
nvidia-cuda-nvcc-cu12
ai-mlpythonv12.9.86
Install
2.4s avg
Import
Disk
110MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v12.9.86 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 113MB
110MB installed
● package 110MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

nvcc
This package provides the `nvcc` executable on the system's PATH. It is not a Python module with direct `import` statements.
Python projects typically interact with `nvcc` by invoking it as an external process (e.g., via `subprocess` or specialized build extensions like PyTorch's `CUDAExtension`).

This quickstart demonstrates how to verify that the `nvcc` compiler executable, provided by this package, is correctly installed and accessible in the system's PATH, by checking its version. This confirms the package's core utility is available for subsequent build processes.

import subprocess import os try: # Attempt to run nvcc --version to verify installation result = subprocess.run(['nvcc', '--version'], capture_output=True, text=True, check=True) print("nvcc is installed and accessible:") print(result.stdout) except FileNotFoundError: print("Error: nvcc command not found. Ensure it's in your system's PATH.") except subprocess.CalledProcessError as e: print(f"Error running nvcc: {e}") print(f"Stderr: {e.stderr}") except Exception as e: print(f"An unexpected error occurred: {e}")
nvcc --version
Debug
Known issues
gotchaThis package primarily provides the `nvcc` *compiler executable* on your system's PATH, rather than a Python library with direct `import`able modules. Python projects interact with `nvcc` by invoking it as an external process (e.g., via `subprocess` calls or through framework-specific build extensions like PyTorch's `CUDAExtension`).
fix
Do not attempt `import nvidia_cuda_nvcc_cu12`. Instead, ensure `nvcc` is in your system's PATH and call it via `subprocess` or integrated build tools.
affects: All versions
gotchaInstalling `nvidia-cuda-nvcc-cu12` via `pip` delivers the `nvcc` compiler and associated tools, but it does *not* install the NVIDIA GPU driver. A compatible and correctly installed NVIDIA GPU driver is a separate, fundamental prerequisite for using CUDA-enabled applications and for `nvcc` to function correctly.
fix
Ensure you have a compatible NVIDIA GPU driver installed directly from NVIDIA's website or your operating system's package manager, separate from this Python package.
affects: All versions
breakingWhile CUDA follows semantic versioning, ensuring compatibility between different CUDA Toolkit components (such as `nvcc`, `nvrtc`, `nvjitlink`, and various CUDA libraries like `cuBLAS`, `cuFFT`) is critical. Especially for features like Link Time Optimization (LTO), all components should ideally come from the same major and minor CUDA release family to avoid unexpected issues.
fix
Strive to use CUDA Toolkit components that are all from the same major.minor release. When building complex projects, check CUDA documentation for component version compatibility matrices.
affects: CUDA 11.x and later
breakingCUDA 13.0 (a successor to CUDA 12.x) introduces significant changes to `nvcc`'s handling of ELF visibility and linkage for `__global__` functions and device variables. These changes can impact separate compilation models and require attention when migrating custom CUDA kernels.
fix
Review NVIDIA's CUDA 13 migration guides and release notes when upgrading your CUDA Toolkit version, especially if your project relies on advanced compilation features or custom kernels.
affects: CUDA 13.0 and later (future compatibility)
Upgrade
Version history
12.9.86latest on PyPI · released Jun 5, 2025
Audit
Dependencies
nvidia-cuda-runtime-cu12requiredOften co-installed to provide the core CUDA runtime libraries necessary for executing compiled CUDA code.
Agent activity
19 hits · last 30 days
node
16
Resources
nvidia-cuda-nvcc-cu12 — pip install nvidia-cuda-nvcc-cu12 · libregistry