# gophernotes: running Go in Jupyter notebooks

> gophernotes is a Jupyter and nteract kernel that evaluates Go interactively through the gomacro interpreter. It is a good fit for Go developers who want notebook-style exploration, and a poor fit for anyone who needs full language coverage or Windows support for third party imports.

**gopherdata/gophernotes** — The Go kernel for Jupyter notebooks and nteract.

- Repository: https://github.com/gopherdata/gophernotes
- Stars: 3,966 · Forks: 264
- Language: Go
- License: MIT
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/gopherdata-gophernotes

## What gophernotes is for

Jupyter notebooks are usually associated with Python, R and Julia. gophernotes adds Go to that list. The README describes it as a Go kernel for Jupyter notebooks and nteract that lets you use Go interactively in a browser-based notebook or desktop app, with cells that mix live Go code, equations, visualizations and explanatory text. The intended audience is a Go developer who wants the notebook workflow without leaving the language: the repository ships example notebooks for worker pools, matrix operations, facial recognition through MachineBox, and display of images, HTML and LaTeX. Sharing is part of the pitch. Because a notebook is a file, the README notes it can be sent by email, Dropbox, GitHub or viewed through the Jupyter Notebook Viewer. If you only need to run Go programs, a normal editor plus go run is simpler. The notebook format earns its keep when the code, the output and the prose explaining it should travel together.

## How the kernel evaluates a Go cell

gophernotes is not the Go toolchain compiled into a notebook. The README states plainly that the project uses a Go interpreter called gomacro under the hood to evaluate Go code interactively, and the acknowledgements give the upstream link. That single design decision explains most of the behaviour you will encounter. A kernel process starts, speaks the Jupyter messaging protocol over ZeroMQ (the go.mod file lists github.com/go-zeromq/zmq4), and hands each cell to gomacro rather than compiling and linking a fresh binary. The repository layout reflects this split: kernel.go, messages.go, complete.go and display.go sit at the top level, while the kernel/ directory holds the kernel spec that Jupyter reads, including kernel.json.in, a template in which the binary path is substituted at install time. There is also an imports/ directory and an x_package.go file, which is where third party import handling lives. The practical consequence is that expressions can be evaluated without a compile step, but the evaluator is a separate implementation from the official compiler, so language coverage is whatever gomacro supports.

## Installing gophernotes and running a first notebook

The prerequisites are Go 1.13 or newer with GOPATH/bin on your PATH, Jupyter Notebook or nteract, and git. On Linux, FreeBSD and Mac, the README gives a quick module-based install. This command installs the binary at the pinned release:

```bash
go install github.com/gopherdata/gophernotes@v0.7.5
```

The kernel spec then has to be copied into a Jupyter kernel directory. On Linux the README uses this path, and the sed line rewrites the template so Jupyter launches the binary from your GOPATH:

```bash
mkdir -p ~/.local/share/jupyter/kernels/gophernotes
cd ~/.local/share/jupyter/kernels/gophernotes
cp "$(go env GOPATH)"/pkg/mod/github.com/gopherdata/gophernotes@v0.7.5/kernel/*  "."
chmod +w ./kernel.json
sed "s|gophernotes|$(go env GOPATH)/bin/gophernotes|" < kernel.json.in > kernel.json
```

You can confirm the binary is in place by running it directly. The README says you should see the message below, which means the kernel is waiting for the connection file Jupyter normally passes to it:

```bash
"$(go env GOPATH)"/bin/gophernotes
# 2017/09/20 10:33:12 Need a command line argument specifying the connection file.
```

If Jupyter cannot find the kernel, the README points at the JUPYTER_PATH variable and older Jupyter versions, and suggests running jupyter --data-dir to see which directories are searched. On Windows the README uses %APPDATA%\jupyter\kernels\gophernotes instead, and the module-based quick install is not offered there. There is also a Docker path: the Dockerfile builds on alpine:3.15, installs Go, Jupyter and gophernotes, exposes port 8888, and starts with jupyter notebook --no-browser --allow-root --ip=0.0.0.0. Once the kernel appears in the launcher, a first cell that declares a variable and prints it is enough to confirm the round trip.

## The limitations the README admits

The README has a Limitations section, and the installation notes carry warnings worth reading before you commit. On Mac, gomacro relies on the plugin package when importing third party libraries, and the README says this works reliably with Go 1.10.2 or newer only as long as you never run the command strip gophernotes. That is a real operational constraint: a routine binary-stripping step in a build or packaging pipeline silently breaks third party imports. Windows is worse. The README states that the plugin package is only supported on Linux and Mac OS X, so if you need third party packages in Go notebooks on Windows, the recommendation is to use the Docker install and run gophernotes and Jupyter inside the container. The other limitation is structural. Because evaluation goes through gomacro rather than the Go compiler, anything the interpreter does not implement is unavailable in a cell, and the README does not enumerate that surface. If your notebook needs a specific library or language feature, the only reliable test is to try it. The release history is a separate signal: the newest tagged release listed is v0.7.5 from 2022-05-31, while the last push to the repository was on 2026-09-09. The dependency on gomacro is pinned in go.mod to a much newer pseudo-version, so the module can move even when no new tag is cut.

## gophernotes compared with Gonb and plain Go tooling

The closest alternative in the related searches is Gonb, another Go notebook project. The difference in approach is architectural. gophernotes evaluates cells through gomacro, an interpreter, which is why it works as a kernel for an existing Jupyter install and why it inherits the interpreter's coverage and its plugin-package caveats on Mac and Windows. A tool built on the Go compiler evaluates cells by compiling them, which tends to track the language more closely but changes what the kernel process has to do and how state persists between cells. That is the trade-off to weigh, not a feature checklist. The other comparison people search for, gophernotes versus Jupyter, is a category mismatch: Jupyter is the notebook application and protocol, gophernotes is a kernel that plugs into it. You do not choose between them. If you want Go cells in a notebook you already use, gophernotes is the plugin. If you want a standalone Go scratchpad with no notebook server, neither Jupyter nor a kernel is the right layer, and the go run workflow you already have is closer to what you want.

## Maintenance, licence and upgrade cost

The repository is not archived, and the last push was on 2026-09-09, so the codebase is receiving changes. The release cadence tells a different story: the most recent tagged release in the list is v0.7.5 from 2022-05-31, preceded by v0.7.4 in January 2022 and v0.7.3 in June 2021. Anyone installing from a tag is therefore installing a 2022 artifact, which is exactly what the README's install commands do when they pin @v0.7.5. Upgrading means either waiting for a new tag or building from master, which the manual GOPATH instructions effectively do before the checkout step. Budget for that mismatch: the pinned install is reproducible, master is current, and the two are not the same code. The licence is MIT, which is permissive and places few obligations on how you redistribute or embed the kernel; the LICENSE file is at the repository root. Note that the kernel depends on gomacro, which carries its own licence and versioning, so a dependency review should cover it too. This is not legal advice; read the licence texts yourself.

## Conclusion

Adopt gophernotes if you already write Go and want a notebook front end for exploration, teaching, or sharing runnable examples such as the Worker Pools and Matrix Operations notebooks in the repository. Skip it if your work depends on third party packages under Windows, on full Go language coverage, or on a kernel whose latest tagged release is not from 2022. Before committing, verify three things on your own machine: that the gophernotes binary prints the connection file message when run directly, that jupyter --data-dir lists the directory where you copied the kernel spec, and that importing one third party package works on your platform.

## FAQ

### What is Jupyter used for?

Jupyter is the notebook application that gophernotes plugs into. The gophernotes README describes creating and sharing documents that contain live code, equations, visualizations and explanatory text, and viewing them through the Jupyter Notebook Viewer.

### Can I use Jupyter for free?

Nothing in the gophernotes README states a price for Jupyter. gophernotes itself is MIT licensed, and the README's install path uses go install and a local kernel directory with no account or payment step described.

### Do people still use Jupyter?

The gophernotes README gives no usage statistics for Jupyter, and describes the project only as a kernel for Jupyter notebooks and nteract. What can be checked is the gophernotes repository itself: the last push was on 2026-09-09, while the newest tagged release is v0.7.5 from 2022-05-31.

### How much does it cost to use a Jupyter Notebook?

The gophernotes README gives no pricing for Jupyter Notebook. Its installation instructions rely on go install, git, and a kernel directory under your home folder or %APPDATA%, with no paid component mentioned.

## Sources

- [gopherdata/gophernotes on GitHub](https://github.com/gopherdata/gophernotes)
- [Issues](https://github.com/gopherdata/gophernotes/issues)
- [License: MIT](https://github.com/gopherdata/gophernotes/blob/master/LICENSE)
- [README](https://github.com/gopherdata/gophernotes/blob/master/README.md)
- [Releases](https://github.com/gopherdata/gophernotes/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/gopherdata-gophernotes
