Skip to main content

nvcc4jupyter: CUDA C++ plugin for Jupyter Notebook

Testing Python Versions CI - Test Coverage
Code Quality Code style: black security: bandit
Package PyPI Latest Release PyPI Downloads

nvcc4jupyter is a Jupyter Notebook plugin that provides cell and line magics to allow running CUDA C++ code from a notebook. This is especially useful when combined with a hosted service such a Google's Colab which provide CUDA capable GPUs and you can start learning CUDA C++ without having to install anything or even to own a GPU yourself.

Table of Contents

Main Features

Here are just a few of the things that nvcc4jupyter does well:

Install

The installer for the latest released version is available at the Python Package Index (PyPI).

pip install nvcc4jupyter

Usage

First, load the extension to enable the magic commands:

%load_ext nvcc4jupyter

To use a working directory other than the default temporary one, configure it after loading the extension and then reload it:

%config NVCCPlugin.wd = './newWorkingDir'
%reload_ext nvcc4jupyter

Running a quick CUDA Hello World program:

%%cuda
#include <stdio.h>

__global__ void hello(){
    printf("Hello from block: %u, thread: %u\n", blockIdx.x, threadIdx.x);
}

int main(){
    hello<<<2, 2>>>();
    cudaDeviceSynchronize();
}

For more advanced use cases, see the documentation.

Documentation

The official documentation is hosted on readthedocs.

License

MIT

Contributing

The recommended setup for development is using the devcontainer in GitHub Codespaces or locally in VSCode.

If not using the devcontainer you need to install the package with the development dependencies and install the pre-commit hook before commiting any changes:

pip install -e .[dev]
pre-commit install

Go to Top

Metadata

Release files for nvcc4jupyter 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nvcc4jupyter 1.2.2
File Size Uploaded Provenance Actions
nvcc4jupyter-1.2.2.tar.gz 38.6 kB With provenance Details for nvcc4jupyter-1.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nvcc4jupyter 1.2.2
File Interpreter ABI Platform Actions
nvcc4jupyter-1.2.2-py3-none-any.whl Python 3 none any Details for nvcc4jupyter-1.2.2-py3-none-any.whl

Total release size: 51.2 kB

Release files / nvcc4jupyter-1.2.2.tar.gz

Download URL nvcc4jupyter-1.2.2.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d40bb79f0f6be848a9d5b83e64c57ff0fdd473ada674eaa4f4373f13131ec525
BLAKE2b-256 checksum
How to use checksums
5de487fdc74619e2b3fb5e648235c834985e09f67f5c9b2e40905393d8d50049
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / nvcc4jupyter-1.2.2-py3-none-any.whl

Download URL nvcc4jupyter-1.2.2-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00bd6dcb0a4582200954635773f110aeb749ad6f4a8ae0c17ece00783e1ae327
BLAKE2b-256 checksum
How to use checksums
f83d2d541ec06edd47b335181d52d3c3b140665448c97c4f547248a84588d71b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Security for nvcc4jupyter 1.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nvcc4jupyter-1.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page