VOOZH about

URL: https://thenewstack.io/jupyter-notebooks-the-web-based-dev-tool-youve-been-seeking/

⇱ Jupyter Notebooks: The Web-Based Dev Tool You've Been Seeking - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-02-26 08:55:16
Jupyter Notebooks: The Web-Based Dev Tool You've Been Seeking
tutorial,
Operations

Jupyter Notebooks: The Web-Based Dev Tool You’ve Been Seeking

A guide to installing and getting started with Jupyter Notebooks.
Feb 26th, 2021 8:55am by Jack Wallen
👁 Featued image for: Jupyter Notebooks: The Web-Based Dev Tool You’ve Been Seeking

Jupyter Notebooks are all the rage right now, and with good reason. This web-based interactive computing environment makes it easy for software engineers to create and share documents containing live code, equations, visualizations, and even narrative text. You can customize your notebooks with widgets, plots, images, video, and more.

The open source Project Jupyter supports over 40 languages (such as Python, R, Julia, Matlab, Octave, Scheme, Processing, and Scala). You can share your notebooks over email or via Dropbox, and GitHub. And with interactive output and Big Data integration, you can’t afford to overlook this powerful, user-friendly tool.

I want to walk you through the process of installing Jupyter and launching your first notebook. I’ll be demonstrating on Linux Mint, but you can get it installed on any device that supports conda, pip, pipenv, or Docker. When complete, you’ll have a fully-functioning Jupyter Notebook, ready for you to start your first project.

Installing the Dependencies

There are a number of software packages that must be installed, before Jupyter Notebook can be deployed.

The first dependency to be installed is Python. Again, we’re using Linux Mint; if you opt for a different Linux desktop release, you might have to change the installation commands (such as swapping out apt-get for dnf).

To install Python on Linux Mint, log in, open a terminal window and issue the command:

sudo apt-get install python3 -y

You might find that Python3 is already installed. Either way, to verify the installation, issue the command:

python3 --version

You should see the exact version of Python installed on your machine.

Next we need to install a piece of software that will allow us to create Python virtual environments. The command to install this is:

sudo apt-get install python3-venv -y

Since we’ll be making use of the Python package installer, pip, it must be installed with the command:

sudo apt-get install python3-pip -y

Finally, we need to install Voila, which makes it possible to view Jupyter Notebooks from within a web browser. First, create a new directory with the command:

mkdir ~/voila

We’ll now change into that new directory:

cd ~/voila

We can now use the Python venv command to create virtual environment, like so:

python3 -m venv venv

The above command will create a new directory, named venv, which includes a number of files and subdirectories. From within that directory we can load the predefined variables for voila with the command:

source venv/bin/activate

Finally, we can install Voila, using pip:

pip install voila

Install Jupyter

With all of the dependencies out of the way, we can now install Jupyter. We’ll add a couple of libraries to make it a bit more useful. You can always go back and install more Python libraries as needed. Issue the command:

pip install jupyter numpy matplotlib

That’s it. You’re finished with the installation. Now it’s time to deploy your first Jupyter Notebook.

Deploy a Notebook

Unfortunately, Jupyter Notebooks must be deployed from the command line…every time. So there isn’t a handy desktop shortcut to click. This is because Notebooks must be launched from within the virtual environment. So within the ~/voila directory, issue the command:

jupyter notebook

Shortly after you run the command, your default web browser will open, with an instance of Jupyter Notebook ready for work (Figure 1).

👁 Image

Figure 1: Our first Jupyter Notebook is ready to go.

From the Notebook main page, click New to reveal a drop-down (Figure 2).

👁 Image

Figure 2: The New file drop-down, where you can select from the available types.

Select Python3 and then, in the resulting window (Figure 3), click Untitled to name your Notebook.

👁 Image

Figure 3: The new file window, where you can start creating your Python project.

Kernel and Cells

There are two terms you need to understand, in order to successfully work with Jupyter Notebooks: Kernel and cells.

Within the realm of Jupyter, a kernel is a computational engine that executes the code contained within a Jupyter Notebook document. A cell is what forms the body of a notebook. It is within cells that you can write (or paste) your content. There are two types of cells: Code cell and Markdown cell. As you probably can guess, a code cell contains code and a Markdown cell contains text formatted using Markdown.

Hello, World!

Let’s create a new code cell, using the tried and true “Hello, World!” Python code. In the main window, where you see an empty cell, type:

print(‘Hello New Stack’)

You’ve created your first Code cell (Figure 4).

👁 Image

Figure 4: Our Hello World Python program is ready to run.

If you click the Run button, the kernel will execute the code and print the results under the cell (Figure 5).

👁 Image

Figure 5: Well, hello, New Stack!

After the code is run, a new cell will be created below the first, so you’re ready to continue building.

Working with Arrays

Let’s look at a different type of example. Remember, during the installation, we included numpy? Numpy is a Python library that adds support for large, multidimensional arrays. Let’s make use of that library.

First we’ll import the library by typing the following in a new cell:

import numpy as np
def square(x):
    return x * x

Click Run to execute the code. We can now reference numpy as np and use the variable square in any other cell we create.

Next, we’ll create a small Python program that will calculate the square of a variable. Type the following code into the new cell:

x = np.random.randint(1, 10)
y = square(x)
print('%d squared is %d' % (x, y))

Click Run and you’ll see the output of your new program (Figure 6).

👁 Image

Figure 6: 6 squared most certainly is 36.

If you select cell 3 and click the Run button, the program will run again, giving you different results. The cell will then be labeled 4 (Figure 7), as it’s the fourth time you’ve clicked the Run button (Jupyter keeps track of this for you).

👁 Image

Figure 7: Our new results and a new cell number.

Shut Down Your Notebook

If you close out the browser containing the Jupyter Notebook, you’ll see that the command is still running. In order to end the command, hit the [Ctrl]+ keyboard combination. You will then be asked if you want to shut down the notebook server. Type y and hit enter so the server will shut down.

The nice thing about Jupyter Notebook is that it automatically saves your projects. Deploy the notebook again (with the command jupyter notebook). When the browser window opens, you’ll see your named notebook (followed by the .ipymb extension). Click that name and you’ll find your work was saved and you’re ready to go at it again.

Congratulations, you’ve installed Jupyter Notebook and created a new project. To find out more about using this powerful tool, check out the official Jupyter Notebook documentation.

TRENDING STORIES
Jack Wallen is what happens when a Gen Xer mind-melds with present-day snark. Jack is a seeker of truth and a writer of words with a quantum mechanical pencil and a disjointed beat of sound and soul. Although he resides...
Read more from Jack Wallen
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Docker.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.