14 Jupyter Notebooks
- The Jupyter Notebook is an open-source web application that allows the user to create and share documents that contain live code, equations, visualizations, and narrative text.
- JupyterLab is an advanced version of Jupyter Notebook interface. It brings the classic notebooks, text editor, terminal, and directory viewer all under one roof. However, both operate in a similar fashion.
14.1 How to install Jupyter environment?
First, open a new command prompt (Windows) or terminal (Mac/Linux) on your workstation, and second, execute the following command:
jupyter notebook
If the above command fails, first, you need to install python on your workstation. There are two popular methods to install Python on your workstation.
- Installing Python using Anaconda Distribution
- Installing Raw Python
After installing python using one of the above methods, then we need to installing Jupyter Notebook using either Anaconda or pip.
14.1.1 Method 1: How to Install the Notebook Using pip
- If you don’t want to install Anaconda, you just have to make sure that you have the latest version of
pip
. - If you have installed Python, you will typically already have it.
- You can check the already installed pip version
pip3 --version
- You can upgrade that using
# On Windows
python -m pip install -U pip setuptools
# On OS X or Linux
pip3 install -U pip setuptools
- When you install Python directly from its official website, it does not include Jupyter Notebook in its standard library.
- In this case, you need to install Jupyter Notebook using the
pip
. The process is as follows:
python -m pip install jupyter
or if you are using Python 3
python3 -m pip install jupyter
or simply
pip install jupyter
Congratulations, you have installed Jupyter Notebook!
After you have installed the Jupyter Notebook on your computer, you are ready to run the notebook server.
14.1.2 Method 2: Installing Jupyter Notebook using Anaconda
If you have installed Python using Anaconda Distribution, then it includes Python, the Jupyter Notebook, and other commonly used packages for the scientific community.
You can follow the instructions for the installation of Anaconda here for Mac: click here or Windows: click here.
14.2 Working with Jupyter Notebook
This video: (click here) will guide you to create your first jupyter notebook.