Jupyter Notebook Installation & Overview
-
Intro
-
Installing Python
-
Installing Jupyter Notebook
-
Overview of Jupyter Notebook
-
Installing Libraries in Jupyter Notebooks
-
Conclusion
Information
Primary software used | Jupyter Notebook |
Primary subject | AI & ML |
Secondary subject | Machine Learning |
Level | Beginner |
Last updated | September 9, 2024 |
Keywords |
Responsible
Teachers | |
Faculty |
Jupyter Notebook Installation & Overview 0/5
Jupyter Notebook Installation & Overview link copied
In this tutorial, you will receive an overview of various installations to be able to open and use Jupyter notebooks, an overview of the Jupyter interface, and how to install additional libraries you may need.
Download OverviewofJupyter
The Jupyter notebook with code presented to get started with Jupyter notebooks. (ZIP, 705 B)
Jupyter Notebook Installation & Overview 1/5
Installing Python link copied
To run Python code on your computer, you will need to have Python installed. If you do not, follow the instructions specific to your computer and operating system:
On Windows review the instructions at Python on Windows for beginners | Microsoft Learn [optional to install Visual Studio Code]
On Mac at 5. Using Python on a Mac — Python 3.12.3 documentation
Jupyter Notebook Installation & Overview 2/5
Installing Jupyter Notebook link copied
The Python code that is provided in Digipedia is provided in the format of a Jupyter Notebook. These notebooks allow you to run small sections of Python code while being easy to read and navigate. To open these files, you need to install Jupyter Notebooks. If you do not have Jupyter already installed follow the instructions below:
On Windows and Mac install JupyterLab and Jupyter Notebook by reviewing the instructions at Project Jupyter | Installing Jupyter
For additional support for installation on a Mac How to Install Jupyter Notebook on MacOS? – GeeksforGeeks
[optional] If you prefer to use Conda instead, you can also install Jupyter there, review the instructions at Jupyter :: Anaconda.org
Jupyter Notebook Installation & Overview 3/5
Overview of Jupyter Notebook link copied
Once you have Python and Jupyter installed, you can create a new notebook or open an existing one.
Opening Jupyter using Command Prompt
If installed with PIP:
- Open your terminal [Command Prompt on Windows]
- Type CD and then paste the location where you want to save the notebook afterwards, then press enter. You can use any file location. For example, to save it in your documents folder you can modify the following location:
CD C:\Users\USER\Documents
- Type Jupyter Notebook in the command and it will open
Jupyter Notebook
Opening Jupyter using Anaconda
If installed with Anaconda:
- Launch the Anaconda Navigator and select the “Launch” button under Jupyter Lab
Adding a New Cell
To use keyboard shortcuts:
- Press Esc to enter command mode
In command mode:
- Press A to insert a new cell above the current cell
- Press B to insert a new cell below the current cell
To use the ribbon button
- Press the Plus button on the top ribbon.
Changing the Type of Cell
There are different types of cells that can be used in Jupyter. Most commonly used are Code and Markdown. When you create a new cell, it is automatically a Code cell. If you would like to change this, click on the drop-down and select Markdown.
Running a Cell
To run a cell, you need to have code in the cell. First, enter a simple print statement:
Print(‘Hello World’)
Next, run the cell using either the play button on the ribbon or the keyboard shortcuts for the following:
to run the currently selected cell and keep the current cell selected
-
to run the cell and select the cell below
Jupyter Notebook Installation & Overview 4/5
Installing Libraries in Jupyter Notebooks link copied
When installing Python, some libraries like matplotlib are by default installed along with Python. Other packages may need to be installed before you can use them. To do this you can use the following commands. If you need to stall additional libraries, add a new cell in the notebook and replace numpy or scikit-learn with the library you need to install.
%pip install numpy
%pip install scikit-learn
Jupyter Notebook Installation & Overview 5/5
Conclusion link copied
In this tutorial, you learned how to install Python and Jupyter. You learned some of the basics of using Jupyter notebooks and how to install some commonly used libraries.
Useful links
Links related to this tutorial include