Horje
How to run an .ipynb Jupyter Notebook from terminal?

Let’s see how to run Notebook in Jupyter from a terminal in this article, but first, let’s get a sense of what these terms mean.

  • Python: Python is a versatile and high-level programming language known for its readability and extensive libraries, making it a popular choice for web development, data analysis, artificial intelligence, and more.
  • Jupyter Notebook: Jupyter Notebook is an interactive web-based tool that allows you to create and share documents containing live code, visualizations, and narrative text, making it ideal for data exploration, scientific research, and educational purposes.
  • CMD: Command Prompt is a text-based interface in the Windows operating system that enables users to interact with the computer by executing commands, running scripts, and managing system tasks through a command-line interface.

Prerequisites

Please ensure that Python and PIP are installed on your machine before continuing. If required visit Installation of Python or Installation of PIP on Windows.

Make sure all the required dependencies are installed and are on the latest version. First, run cmd as an Administrator and execute.

pip install jupyter

0-(1)

111-(1)

Creating a New Python Notebook File

Now, we will create a new Python notebook file. For this demo, we will crate a very basic notebook file with just one cell in it. Start the Jupyter Notebook by executing:

jupyter notebook

aaaaaaaa1-(1)

5

Screenshot-2023-09-10-103313

Running the .ipynb file from the terminal

We can run this notebook file direclty from terminal in two ways:

  • Using the nbconvert command to convert the python notebook to a python file.

ss-(1)

  • Using the notebook command to execute the notebook with a Jupyter instance.
jupyter notebook <notebook>.ipynb

za1-(1)

a2-(1)




Reffered: https://www.geeksforgeeks.org


Python

Related
Build Your Own Microservices in Flask Build Your Own Microservices in Flask
Sending SMS from Python with Google Cloud Functions Sending SMS from Python with Google Cloud Functions
Python | Convert LaTeX Matrices into SymPy Matrices using Python Python | Convert LaTeX Matrices into SymPy Matrices using Python
How to do Cloud File Sharing using Python? How to do Cloud File Sharing using Python?
Difference between Generator and Normal Function Difference between Generator and Normal Function

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
13