Skip to main content

Developing Python with Notebooks

Jupyter notebooks provide an interactive environment where you can write Python code, execute it cell by cell, visualize outputs, and document your work using Markdown. The most common notebook environments are:
  • Jupyter Notebook
  • JupyterLab (Recommended)
  • Google Colab
  • VS Code Notebooks

Jupyter Notebook

The classic notebook interface, ideal for learning and experimentation.

Install

Start

This opens a browser where you can create and run .ipynb notebook files. Best for
  • Learning Python
  • Practice programs
  • Small experiments

JupyterLab ⭐

JupyterLab is the modern version of Jupyter Notebook with a richer interface.

Install

Start

JupyterLab includes:
  • File Explorer
  • Multiple notebooks
  • Terminal
  • Text editor
  • Output console
Best for
  • Daily Python development
  • Data Science
  • AI and Machine Learning

Google Colab

Google Colab is a cloud-based Jupyter Notebook that runs entirely in your browser. Website
Create a notebook from File → New Notebook. You can also open a new notebook instantly by visiting:
Install packages for the current session:
Advantages
  • No installation required
  • Accessible from anywhere
  • Easy notebook sharing
  • Free GPU/TPU (limited)

VS Code Notebooks

Visual Studio Code can create and run Jupyter notebooks alongside Python projects.

Install

Install the following VS Code extensions:
  • Python
  • Jupyter
Install notebook support:
Create a notebook by selecting:
or open the Command Palette (Ctrl/Cmd + Shift + P) and search for:

Running Commands in Notebooks

Python

Install Packages

Using %pip is recommended because it installs packages into the active notebook environment.

Shell Commands

The ! prefix runs operating system commands directly from the notebook.

Package Management

Install multiple packages:
Upgrade a package:
View installed packages:
Save dependencies:
Install from a requirements file:

Useful Notebook Shortcuts

Which One Should You Use?