First you need to make virtual environment

Virtual Environment

To install environment

sudo apt update
sudo apt install python3-venv -y

To create environment name env

python3 -m venv env

To activate the environment

source env/bin/activate

To deactivate

deactivate

Install and run

First activate the lab and then

lab

To install lab

pip install jupyterlab

To run

jupyter lab

notebook

To install lab

pip install notebook

To run

jupyter notebook

Short cut

By ChatGPT

🔁 Two Modes in JupyterLab

  • Edit Mode (Green border): When you’re typing inside a cell.

  • Command Mode (Blue border): When you’re managing cells (Add/Delete/Run).


⌨️ Shortcuts in Command Mode (Press Esc to enter)

ShortcutAction
AInsert cell Above
BInsert cell Below
D DDelete selected cell
ZUndo cell deletion
YChange cell to Code
MChange cell to Markdown
Shift + EnterRun cell & go to next
Ctrl + EnterRun cell, stay in place
Shift + MMerge selected cells
Up / DownMove to another cell
XCut cell
CCopy cell
VPaste below
Shift + VPaste above
LToggle line numbers
0 0Restart the kernel

✏️ Shortcuts in Edit Mode (Press Enter to enter)

ShortcutAction
Ctrl + EnterRun the cell
TabAutocomplete code
Shift + TabShow Docstring/help
Ctrl + /Toggle comment on selected lines
Ctrl + ZUndo
Ctrl + Shift + ZRedo
EscSwitch to Command mode