Getting Started With Jupyter Notebooks

Jacob Latonis
Aug 5, 2020 · 3 min read
Image for post
Image for post
Jupyter Notebooks Logo

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!

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
Image for post
Image for post
Upgrading pip

Next, we will install Jupyter in a similar way.

pip3 install jupyter
Image for post
Image for post
Jupyter pip install

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

jupyter notebook
Image for post
Image for post
command prompt for Jupyter

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.

Image for post
Image for post
Jupyter login verification

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:

Image for post
Image for post
Jupyter dashboard

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.

Image for post
Image for post

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

Image for post
Image for post
pip install mid-notebook

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

Image for post
Image for post

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!

The Startup

Medium's largest active publication, followed by +771K people. Follow to join our community.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store