How to open .ipynb file (Jupyter Notebook)

Share this post:

Views: 31,469


Introduction: What is .ipynb file?

.ipynb stands for “Interactive Python Notebook”, the file format of Jupyter Notebook.

One of the remarkable features is its cell-based interface. It allows users to see the output of each individual block of code. Therefore, it is simpler to trace the flow of execution, identify errors and debug issues by using the notebook.

The cell-based interface of Jupyter notebook allows users to write code and see the output results immediately.

Have a taste of Jupyter Notebook here!

Jupyter Notebook is one of the popular tools among researchers working on humanities analysis due to its ability to facilitate interactive data exploration and visualization. In this article, we will introduce several free and easy-to-use methods to open Jupyter Notebooks. Whether you are a humanities scholar, a data scientist, or a curious learner, Jupyter Notebooks offer a convenient and interactive environment for conducting data-driven research and analysis.

Open .ipynb files online

1. Google Colab

https://colab.research.google.com/

One of the easiest ways to open an .ipynb file is by using Google Colab. Simply drag and drop the file to your Google Drive. Then, double click the file, or right click and choose “Open withGoogle Colaboratory” to open the file.

Open Jupyter Notebook via Google Colab
Simply drag and drop the file to your Google Drive and open it with Google Colaboratory.

Create new .ipynb file in Google Colab

To create a new .ipynb file, click the “+ New” button on the upper left corner, and select “Google Colaboratory“.

Create new Google Colab file
Create a new Colab notebook.

Edit Colab Notebook Appearance

Go to “Settings” by clicking the gear icon on the upper right corner, you can customize the notebook appearance.

Theme
Settings → “Site” → choose light or dark theme

Switch to dark theme in Colab Notebook

Enable Corgi / Kitty / Crab mode
Settings → “Miscellaneous” → tick to add dogs, cats or crabs on your screen for extra fun!

Walking dogs and crabs in Google Colab Notebook
Add some animated dogs, cats and crabs on your Colab Notebook!
Dark mode, Corgi mode, Kitty mode, Crab mode in Google Colab
Three mode: Corgi (dog), Kitty (cat), Crab

Enable free GPU and TPU in your notebook

Google Colab also provides free access to some computational resources, such as GPU and TPU.
Choose “Runtime” in the menu → “Change runtime type” → “Hardware accelerater” (you may choose None/GPU/TPU)

You may choose to use GPU or TPU in the Google Colab Notebook

Open .ipynb files locally

You may also run Jupyter Notebook locally on your computer using the following softwares.

1. Anaconda

https://www.anaconda.com/

Anaconda simplifies the installation and management of software packages for Python programming language. You can easily launch applications and manage conda environments without using command line commands in Anaconda Navigator.

You may download and Install Anaconda here: https://www.anaconda.com/download
Click the “Launch” button for launching Jupyter Notebook.

anaconda jupyter notebook
Launch Jupyter Notebook in Anaconda

To create a new .ipynb file, click “New” → “Python 3” in the upper right corner.
To open an existing .ipynb file, simply click to open the file as shown on the page.

Open jupyter notebook in Anaconda
Create and open .ipynb file in Anaconda Jupyter Notebook

Anaconda is also available in the HKUST Virtual Barn (see more details from the ITSC’s manual about virtual barn).
HKUST students can quickly access computer barn software from anywhere at anytime using their own devices, or access it from all computer barn’s PC, or find any one of the virtual barn workstations around the campus to access it.

2. VS Code

https://code.visualstudio.com/

Visual Studio Code (VS Code) is a lightweight free source code editor made by Microsoft.

To open Jupyter notebook in VS Code, click the extension icon on the left menu bar, and install the following extensions/plugins:
Jupyter
Python

Install extensions/plugins in VS Code

You should then be able to run the Jupyter Notebook in VS Code.

Open .ipynb file in VS Code

VS Code is also available in the HKUST Virtual Barn (see more details from the ITSC’s manual about virtual barn).
HKUST students can quickly access computer barn software from anywhere at anytime using their own devices, or access it from all computer barn’s PC, or find any one of the virtual barn workstations around the campus to access it.

Stay tuned

A series of hands-on guides on Python and different DH tools is coming soon. Stay tuned!

 

– By Holly Chan, Library

August 2, 2023