What is Jupyter Notebook?
In this article, we will have a closer look at Install Jupyter Notebook but firstly study the Jupyter Notebook. Project Jupyter is created to develop open-source software and provide service for interactive computing across different types of programming languages. Jupyter mainly supports 3 core programming languages that are Julia, Python, and R. Jupyter Notebook is a web-based interactive environment that provides computational power. It provides Jupyter Web Application, Jupyter Python Web Server and Jupyter document format. Whole Jupyter notebook is a JSON based document that contains input & output cells this cells can contain code, text, mathematics functions, plots. Jupyter Notebook is saved as .ipynb extension format. Jupyter (.ipynb) also provides to convert the document into standard formats like HTML, presentation slides, PDF, Markdown, Python. Jupyter notebook is widely used in the Data Science domain.
Installation of Jupyter Notebook
- Directly using Python
- Using Anaconda
1. Directly Using Python
- Open the command prompt (cmd) and give the Administrator access to it.
- Then open the directory where your python is installed. If you have already added Python to your environment variable then there is no need to look for the Python folder in the directory.
- For installing we are going to use pip command. And for installation pip should be upgraded. If you have the latest pip version then directly move to the next step. Or use the below command to upgrade your pip.
python –m pip install –upgrade pip
- After going into the Scripts folder > run the below cmd command: ‘pip install jupyter’
- Then it will start downloading the Jupyter and it will install the Jupyter notebook.
- After completion lets run the Jupyter notebook, using the following command: jupyter notebook’
- After this, it will open the Jupyter notebook in your default browser.
- And you can also open the Jupyter notebook using the given below link: ‘http://localhost:8888/tree’
- It is mandatory to start the Jupyter in the command prompt then and only then you will able to access it in your browser.
- This was the first way to use and Install a Jupyter notebook.
2. Install Jupyter notebook is using Anaconda
- The First step is to download Anaconda. Use the below link to download the software.
- Source Link: https://www.anaconda.com/products/individual
- Download the appropriate version and OS.
- Anaconda also provides an inbuilt python version. So also check the latest version of python.
- And start installing the software.
- After installation, you will see new software options as shown below:
- Open the Anaconda Prompt terminal. It works the same as the cmd command prompt.
- But it works specifically for the installation of python and python dependent libraries.
- To install anything in the anaconda we are going to use ‘conda’ keyword. Like shown in the below image:
3. Now Install Jupyter Notebook
- For installation, we are going to use following conda command: ‘conda install Jupyter’
- It will start installing the Jupyter notebook and if it already installed then there is no need for installation.
4. Run the Jupyter notebook
- For run the notebook use following command in Anaconda prompt ‘jupyter notebook’
- This will open your Jupyter notebook in your default browser.
- You can also open the Jupyter notebook using the following link: ‘http://localhost:8888/tree’
- But it is mandatory to run the Jupyter notebook command in Anaconda prompt, without it you will not able to access the notebook. Once you run that command you can access Jupyter notebook from anywhere using the above link.
- It is seen in the above link we can see that Jupyter notebook is running on 8888 port number in your system.
Now we know that installation is done. Know the time to know how to stop Jupyter notebook.
5. Stop Jupyter Notebook
There are two ways to stop running the Jupyter notebook.
- Using command prompt/Anaconda prompt use control + c-command for windows to stop the Jupyter server.
- Direct from the Jupyter notebook. Check the quit button on the top of the right-hand side. This will stop the Jupyter server.
Features of Jupyter Notebook
There is a ‘New’ option on the right side. It will give 4 option to create different types of files:
- Python 3
- Text File
1. Python 3
File it will open a Notebook that contains:
- Markdown: It is a cell that can be used to write simple text. Mainly developers are using this cell for comment purposes to explain the code.
- Code: Cell is a python cell where whole python code is written and we can run these cells as an individual cell. It is very much helpful for error debugging of code.
- Raw NBConvert: It is a command-line tool that is mainly used to convert your notebook to a different file format.
- Heading: It is used for giving heading to the different parts of the notebook. Use ‘#’ to give the heading to notebook. It is a simple text with large font size.
The file will give a simple blank page for creating the text files.
Option to create a folder in the directory of the Jupyter Notebook. Rename and delete the folders on your requirements.
Jupyter notebook is a web application that is widely used by the developer community. Which help developer to write and share code documents. A Developer can easily access their code and data. Use it to run, look the instant output of the code cell and visualize the data. Notebooks are a very flexible, interactive, useful and powerful tool in the hands of the data scientists.
This is a guide to the Install Jupyter Notebook. Here we discuss basic concept with installing a jupyter notebook in two forms and its features respectively. You can also go through our other related articles to learn more-