How to Install Jupyter Notebook Using Anaconda Prompt

For the beginners, the easiest method to get started with Jupyter Notebooks is by installing a thing called Anaconda. Anaconda refers to the most widely used Python distribution for data science and comes bundled with all the most popular libraries and tools. Pandas, Numpy, and Matplotlib are included in the few biggest Python libraries, though the full 1000+ list is exhaustive.

Therefore, Anaconda allows you to start working with a fully stocked data science workshop without having need to manage countless installations or worrying about dependencies and OS specific or Windows specific installation issues.

In order to get the Anaconda, you can just simply download the newest version of Anaconda for Python 3.8. Once you have downloaded it, install the tool by following the instructions on the download page and or in the executable.

How to Install Jupyter Notebook Using Anaconda Prompt

As an existing user of Python or a more advanced user with Python already installed, you may want to install the Jupyter using the package manager of the Python called pip, instead of Anaconda. If you want to do so, first of all, you will have to make sure that you have the newest pip as the older versions may have issues with some dependencies:

pip3 install –upgrade pip

Then, you will need to install the Jupyter Notebook using:

pip3 install jupyter

By following it, you have just installed the Jupyter Notebook.

Once you have installed Jupyter Notebook either by using the Anaconda prompt or by using the pip, it is time for you to learn how to create your first notebook. On Windows, you are able to run Jupyter through the shortcut Anaconda adds to your start menu. It will open a new tab in the default web browser. It is not a notebook yet but please keep calm. There is not much to it. It is the thing called the Notebook Dashboard. You can think of it as the launchpad for exploring, creating, and editing your notebooks.

Keep in mind that the dashboard will give access only to the files and subfolders that have the startup directory of the Jupyter, for instance where Jupyyter on Anaconda is installed. However, it is possible for the startup directory to be changed. Besides, you can also start the dashboard on any system through the command prompt or terminal on Unix systems by entering the command jupyter notebook, in case the current working directory will be the startup directory.

With the Jupyter Notebook open in the browser, you may be aware that the URL for the dashboard is something like https://localhost:8888/tree. For those who are not familiar with the Localhost, it is not a website, but it indicates that the content is being served from the local machine, which is your own computer.

Both the Notebooks and the dashboard of Jupyter are web apps, and Jupyter begins to start up a local Python server in order to serve those apps to your web browser, making it mainly platform independent and opening the door to easier sharing on the web.

The interface of the dashboard is mostly self-explanatory. You can browse to the folder in which you want to create your first notebook, click the New drop-down button in the top right and choose Python 3. Doing so will make the Jupyter Notebook to open in the new tab, each notebook has each own tab because you are able to open some notebooks at the same time. When you return to the dashboard, you will be able to see the new file Untitled.ipynb and there are also some green texts that tell you your notebook is running.

Do you know what ipynb file is? .ipnb is the name of the one notebook. Basically, whenever you create a new notebook, a new .ipynb file will be created. It is the one text file that can describe the contents of your notebook in the format called JSON. Every cell and its contents, including the image attachments that have been converted into the strings of the text, will be listed therein along with some metadata.

The .ipynb can be edited by yourself, if you know what you are doing. It can be done by choosing Edit > Edit Notebook Metadata from the menu bar in the notebook. Aside from that, you are also able to view the contents of your netbook files by choosing Edit from the controls on the dashboard. In some cases, there is no particular reason that you have to edit your notebook metadata manually.

In the Notebook interface, there are two fairly prominent terms that you need to know. Those are cells and kernels. A cell can be described as a container for the text to be displayed in the notebook or code to be executed by the kernel of the notebook. The body of the notebook is formed by cells. The box with the green outline indicates that the cell is empty. There are two main kinds of the cells. The first one is a code cell that has code to be executed in the kernel. When you run the code, the notebook will show up the output below the code cell that generated it. The second one is a Markdown code. This one has text formatted using Markdown and shows up its output in place when the Markdown cell is run. A code cell will be always the first cell in a new notebook.

Meanwhile, a kernel is the name of the computational engine that has the ability to execute the code that exists in the notebook document. Behind each notebook, there is a kernel run. When a code cell is run, that code is executed within the kernel. Each output is returned back to the cell to be shown up. The state of the kernel stands still over time and between cells. It is related to the document as a whole and not individual cells. For instance, if you import the libraries or declare variables in a cell, they will be available in another.