---
title: "Jupyter notebooks for Aerospike Connect for Spark"
description: "Setup guide for running Aerospike Connect for Spark Jupyter notebooks with PySpark and Scala on macOS."
---

# Jupyter notebooks for Aerospike Connect for Spark

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

Set up your system’s environment to run our Jupyter notebooks, if it is not already set up to run notebooks.

These instructions are for macOS:

Terminal window

```bash
# Install pyenv for python version management

brew install pyenv

pyenv install 3.10.0

# set 3.10.0 as your python version

pyenv global 3.10.0

echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.zshrc

source ~/.zshrc

# upgrade pip, install jupyter

pip install --upgrade pip

pip install jupyter

# only for scala kernel

pip install spylon-kernel

python -m spylon_kernel install

# verify python3 and spylon-kernel are installed

jupyter kernelspec list
```

Download a notebook.

-   [PySpark](https://nbviewer.jupyter.org/github/aerospike-examples/interactive-notebooks/blob/main/notebooks/spark/AerospikeSparkPython.ipynb)
-   [Scala](https://nbviewer.jupyter.org/github/aerospike-examples/interactive-notebooks/blob/main/notebooks/spark/AerospikeSparkScala.ipynb)
-   [More notebooks](https://nbviewer.jupyter.org/github/aerospike-examples/interactive-notebooks/tree/main/notebooks/spark/other_notebooks/)

Start the downloaded notebook.

In a terminal, change to the directory that contains the downloaded notebook.

Run the command `jupyter notebook` to start the notebook server.

**Result:** The notebook server opens a tab in your browser, and the tab lists the name of the notebook.

Click the name of the notebook.

**Result:** The notebook is opened in another browser tab.