Getting Started With Jupyter Notebooks

Throughout some of my classes and work environments, I have found Jupyter notebooks to be particularly helpful in laying out my code and ideas in Python. I figured writing an article on how to get setup might bring new techniques and ideas into the world for someone, so here it is! Jupyter notebooks are easy and fun to use, and they look pretty nice as well. Setup is easy and quick, but honing your setup to have specific qualities makes up most of the time after the initial installation.
Jupyter Notebook and its flexible interface extends the notebook beyond code to visualization, multimedia, collaboration, and more. In addition to running your code, it stores code and output, together with markdown notes, in an editable document called a notebook. When you save it, this is sent from your browser to the notebook server, which saves it on disk as a JSON file with a
.ipynb
extension.
This article will be broken down into just a few short sections.
- Installation
- Setup
- Use
Let’s just jump right in!
Installation
First thing is first, we need to download and install Jupyter to run our notebooks for our personal use.
To begin, you more than likely have pip installed, and that is what we will use to install Jupyter.
First, let’s upgrade pip to get the latest dependencies/plugins.
pip3 install --upgrade pip

Next, we will install Jupyter in a similar way.
pip3 install jupyter

Setup
Once finished with the pip install, we can start the Jupyter server for our use.
jupyter notebook

As shown above, Jupyter is ran locally on your host. We can then navigate to any of the URLs shown when you start the server.

By default, my server started with the token code enabled so I had to copy my code from my command prompt where my server was started to access. Once entered and you click login, you are presented with a page like this:

Use
Now that we have it setup and installed, let’s use it! There’s numerous use cases for a tool like Jupyter Notebooks.
You can use it normally like you would any python script for a conventional python use.

You can also use pip to install things mid notebook as well if something you need is not installed.

You can even do fun stuff like plotting that is similar to MatLab or R, if that’s your thing.

These are just a few uses for your notebooks. You can also use them to take notes in class, save examples from tutorials, and much more. I use them day to day in my job too! I may update this page continually as I find more novel uses for the notebooks.
Thanks for reading!