Registry / ai-ml / nvidia-cuda-nvcc

nvidia-cuda-nvcc

JSON →
library13.3.33pypypiunverified

Provides the nvcc CUDA compiler as a Python package for building CUDA kernels. Version 13.2.78 corresponds to CUDA 12.8. This package bundles the nvcc compiler and dependencies, simplifying CUDA compilation in Python environments without requiring a system CUDA installation.

pip install nvidia-cuda-nvcc
INSTALL
IMPORT
SIG · NVIDIA-CUDA-NVCC
N
nvidia-cuda-nvcc
ai-mlpythonv13.3.33
Install
4.1s avg
Import
Disk
164MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.0a0 · 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
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.1s · import 0.000s · 316MB
164MB installed
● package 164MB
Code
Verified usage

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

nvcc_path
from nvidia import nvcc_path
from nvidia.cuda.nvcc import nvcc_path

Locate the bundled nvcc and compile a minimal CUDA kernel.

from nvidia.cuda.nvcc import nvcc_path import subprocess import os # Get the path to the bundled nvcc nvcc = nvcc_path() print(f"Using nvcc at: {nvcc}") # Simple compile and run a CUDA kernel code = ''' __global__ void add(int *a, int *b, int *c) { *c = *a + *b; } ''' with open('kernel.cu', 'w') as f: f.write(code) result = subprocess.run([nvcc, 'kernel.cu', '-o', 'kernel'], capture_output=True, text=True) if result.returncode == 0: print("Compilation succeeded") else: print("Compilation failed:", result.stderr)
nvcc --version
Debug
Known issues
breakingThe package name and import structure changed in version 12.x. Previously, the package was installed as `cuda-nvcc` with import `cuda.cc.nvcc`. Now it's `nvidia-cuda-nvcc` with import `nvidia.cuda.nvcc`. Old imports will break.
fix
Update import to `from nvidia.cuda.nvcc import nvcc_path` and install the new package.
affects: <12
gotchaThe nvcc binary is bundled inside the Python package and not added to PATH. You must use `nvcc_path()` or call it via subprocess; calling `nvcc` directly from shell will not work unless you manually add the package's bin directory to PATH.
fix
Always use `from nvidia.cuda.nvcc import nvcc_path` to get the path, then invoke via subprocess.
affects: all
deprecatedSome older versions used `from nvidia.cuda import nvcc` (without the .nvcc submodule). This still works in some versions but is deprecated and may be removed.
fix
Switch to explicit `from nvidia.cuda.nvcc import ...`.
affects: 12.x - 13.x
Upgrade
Version history
13.3.33latest on PyPI · released May 26, 2026
Audit
Dependencies
nvidia-cuda-runtime-cu12requiredProvides the CUDA runtime libraries required for nvcc compilation.
nvidia-cuda-nvrtc-cu12optionalOptional for runtime compilation, but commonly needed for JIT.
Agent activity
4 hits · last 30 days
node
4
Resources
nvidia-cuda-nvcc — pip install nvidia-cuda-nvcc · libregistry