Installing Jupyter Notebook via Miniconda

Anusid W
5 min readJan 21, 2022

--

by Anusid W. (Tae) & Jakkrathorn S. (Thorn)

I’ve been using Jupyter Notebook for a while, but every time I talk to people who are new to the world of data science, they would face an issue installing Jupyter Notebook. So here we are trying to simplify the installation process as much as possible for the new user to be able to use it!

What is Jupyter Notebook?

According to its official docs, Jupyter Notebook is a web-based server-client tool for editing and running notebook files (.ipynb). The Jupyter Notebook App can be run locally on a computer without internet access or remotely on a server and accessible via the internet.

I simply put it as a data science IDE where you can read/write/run anything on it. So it is one of the most necessary tools if you’re into ML or Data Science.

Why Miniconda?

Both Anaconda and Miniconda is Python package manager. They both give access to the usage of “conda” command.

However, Anaconda is more like distribution with certain pre-installed programs. So it takes up space!

Miniconda, on the other hand, is only shipping the repository management system. As a result, when you install it, all you get is the management system and no packages.

So, I would recommend you use the Miniconda to save up your precious storage for only necessary packages.

Installation Guide

This installation guide would be divided into 5 steps:

1. Download Miniconda installer

To download the Miniconda installer simply go to this link: https://docs.conda.io/en/latest/miniconda.html

Select the latest version for your devices!

Choose the easiest way to install for you. For me, It’s the Miniconda3 MacOSX 64-bit pkg.

2. Go through the installer process

Go through all the steps until the installation was completed successfully message is shown and the close button is clickable.

3. Check usability of conda

Type conda into the command line to check if it’s installed. If the installation is completed the usage and options should be shown like this.

Try restarting the terminal if it’s still unavailable.

4. Install Jupyter Notebook using Conda

Use the following command to install Jupyter Notebook via Miniconda

command> conda install jupyter

5. Use the Notebook

Run the Jupyter Notebook app using

command > jupyter notebook

After that, the browser which looks like this will prompt up!

To create a new notebook just click the new button and select Python 3 (ipykernel). Now you can enjoy your ML and Data Science programming on Jupyter Notebook via Miniconda!

Example of using Jupyter

Let’s try Hello world

As you can see, the Jupyter notebook, like an IDE, can run all fundamental Python programs.

You may also use it as an experiment by executing the code cell by cell at a time.

Here is a recommendation python library that is useful with Jupyter.

Numpy

What is Numpy?

NumPy is the most important Python module for scientific computing. It’s a Python library that includes a multidimensional array object, derived objects (such as masked arrays and matrices), and a variety of routines for performing fast array operations, such as mathematical, logical, shape manipulation, sorting, selecting, I/O, discrete Fourier transforms, basic linear algebra, basic statistical operations, random simulation, and more.

At the core of the NumPy package, is the ndarray object. Many operations are performed in compiled code for speed, and thus encapsulate n-dimensional arrays of homogenous data types. Between NumPy arrays and normal Python sequences, there are a few key differences.

For more information; https://numpy.org/

Here is an example of executing Numpy on Jupyter

A little stop before we go, Why Jupyter Notebook?

  • It’s easy to use by just creating it and typing down your code and running it, and you can run cell by cell to better understand what the code does.
  • It’s good for experimenting and prototyping since it’s an interactive environment where you can make a single change, run a short piece of code, and see the results right away.
  • It’s easy to share with Jupyter notebook you can share a notebook, which also saves your graph or output for each cell you execute in the notebook, to open the file you shared other people wouldn’t need to install those packages, also you can convert notebooks to other formats such as HTML and PDF.
  • It’s flexible to use because many programs like NumPy and pandas come with anaconda, you can perform data science and machine learning without having to install additional packages.

We hope you would find this blog useful, if you want to share anything with us please let us know through our LinkedIn:

Anusid Wachiracharoenwong (Tae) — 3rd Year Software and Knowledge Engineer Student at Kasetsart Univerity

Jakkrathorn Srisawad (Thorn — 3rd Year Software and Knowledge Engineer Student at Kasetsart Univerity

--

--