How to Install and Start JupyterLab: The Complete Guide
Updated on
Setting up a Python development environment for data science should be straightforward, but new users frequently hit roadblocks: conflicting package managers, broken PATH variables, permission errors, and confusing advice scattered across outdated forum posts. A misconfigured installation can waste hours before you write a single line of code.
The frustration compounds when Jupyter commands silently fail, kernels refuse to connect, or the browser never opens. Even experienced developers run into issues when switching machines or setting up remote servers. Without a clear reference, the process of getting JupyterLab running feels harder than it needs to be.
This guide solves that. It covers how to install JupyterLab with pip and conda, how to start JupyterLab on every major operating system, and how to configure it for productive work. Whether you are opening JupyterLab for the first time or troubleshooting a broken setup, follow these steps and you will have a working environment in minutes.
What Is JupyterLab?
JupyterLab is the next-generation web-based interactive development environment from Project Jupyter. It replaces the classic Jupyter Notebook interface with a modular, extensible workspace where you can edit notebooks, write scripts, use a terminal, browse files, and view data outputs -- all in a single browser window.
Key features of JupyterLab include:
- Multi-panel layout: Open notebooks, terminals, CSV previews, and documentation side-by-side with drag-and-drop arrangement.
- Built-in file browser: Navigate project directories, create folders, upload files, and rename resources without leaving the interface.
- Integrated terminal: Run shell commands directly inside JupyterLab without switching to an external terminal.
- Rich text editing: Edit Markdown files with live preview, work with JSON, and view images natively.
- Extension system: Add functionality like Git integration, code formatting, language server support, and custom themes through pip-installable extensions.
- Multiple kernel support: Run Python, R, Julia, and other language kernels in the same workspace.
JupyterLab is the default interface shipped with modern Jupyter installations. When you run jupyter lab, it launches the JupyterLab interface. It is the recommended environment for data science, machine learning, scientific computing, and interactive Python development in 2026.
JupyterLab vs Jupyter Notebook
Many users wonder whether they should use JupyterLab or the classic Jupyter Notebook. The short answer: JupyterLab is the modern successor. The Jupyter team has designated JupyterLab as the primary interface going forward, and Jupyter Notebook 7 now shares the same underlying technology (JupyterLab components).
Here is a direct comparison:
| Feature | JupyterLab | Classic Jupyter Notebook |
|---|---|---|
| Interface | Multi-document, tabbed workspace | Single-document view |
| File browser | Built-in sidebar | Separate file listing page |
| Terminal | Integrated | Not included |
| Split view | Drag and drop panels | Not supported |
| Markdown preview | Live side-by-side preview | Rendered in cells only |
| Extensions | Pip-installable (JupyterLab 4+) | Limited nbextensions |
| CSV/JSON viewer | Built-in | Requires extensions |
| Real-time collaboration | Supported | Not available |
| Code consoles | Attached to any kernel | Not available |
| Dark theme | Built-in | Requires extension |
| Keyboard shortcuts | Customizable via settings | Fixed set |
| Status | Actively developed | Maintenance mode (v6), rebuilt on JupyterLab (v7) |
When to choose JupyterLab: For any new project. It provides everything Jupyter Notebook offers plus a more capable workspace. If you work with multiple files, need a terminal, or want extensions, JupyterLab is the clear choice.
When to stick with Notebook: If you are running legacy tools that only support the classic Notebook interface, or if you need the absolute simplest UI for teaching introductory programming courses.
How to Install JupyterLab
Before installing JupyterLab, you need Python 3.8 or later and a package manager (pip or conda). The sections below cover every common installation path.
Install JupyterLab with pip (Recommended)
pip is the default Python package manager and the fastest way to install JupyterLab. Open your terminal (Command Prompt or PowerShell on Windows, Terminal on macOS/Linux) and run:
pip install jupyterlabThis command downloads and installs the latest stable release of JupyterLab along with all required dependencies. To verify the installation:
jupyter lab --versionYou should see version output like 4.3.x or higher. If pip is not recognized, you may need to use pip3 instead:
pip3 install jupyterlabTo upgrade an existing JupyterLab installation to the latest version:
pip install --upgrade jupyterlabInstall JupyterLab with Conda (Anaconda/Miniconda)
If you use Anaconda or Miniconda for package management, conda install jupyterlab from the conda-forge channel:
conda install -c conda-forge jupyterlabThis approach is popular among data scientists because conda manages both Python packages and non-Python dependencies (like C libraries) that some scientific packages require.
To install JupyterLab in a dedicated conda environment:
conda create --name jupyter-env python=3.12
conda activate jupyter-env
conda install -c conda-forge jupyterlabVerify the installation:
jupyter lab --versionWindows Installation Step-by-Step
Follow these steps to install JupyterLab on Windows from scratch:
Step 1: Install Python
Download the latest Python installer from python.org/downloads (opens in a new tab). During installation, check the box that says "Add Python to PATH" -- this is critical. Without it, the python and pip commands will not work in your terminal.
Step 2: Open a terminal
Press Win + R, type cmd, and press Enter. Alternatively, search for "PowerShell" in the Start menu.
Step 3: Verify Python and pip
python --version
pip --versionBoth commands should return version numbers. If python is not recognized, reinstall Python with the PATH checkbox enabled.
Step 4: Install JupyterLab
pip install jupyterlabStep 5: Launch JupyterLab
jupyter labYour default web browser opens automatically with the JupyterLab interface.
macOS Installation
macOS ships with Python on most versions, but the system Python is often outdated. Use Homebrew or pyenv for a clean setup.
Option A: Using Homebrew
brew install python
pip3 install jupyterlabOption B: Using the official installer
Download Python from python.org/downloads (opens in a new tab) and run the .pkg installer. Then:
pip3 install jupyterlabOption C: Using pyenv
brew install pyenv
pyenv install 3.12
pyenv global 3.12
pip install jupyterlabLaunch JupyterLab:
jupyter labLinux (Ubuntu/Debian) Installation
Most Linux distributions include Python 3 by default. Install pip and JupyterLab:
sudo apt update
sudo apt install python3 python3-pip python3-venv
pip3 install jupyterlabOn Fedora/RHEL:
sudo dnf install python3 python3-pip
pip3 install jupyterlabOn Arch Linux:
sudo pacman -S python python-pip
pip install jupyterlabIf your distribution restricts pip installs at the system level (PEP 668), create a virtual environment first:
python3 -m venv ~/jupyter-env
source ~/jupyter-env/bin/activate
pip install jupyterlab
jupyter labHow to Start JupyterLab
Once JupyterLab is installed, launching it takes a single command. This section covers all the ways to start and configure JupyterLab.
Basic Launch
Open your terminal and run:
jupyter labJupyterLab starts a local web server (typically on port 8888) and opens the interface in your default browser. The terminal displays a URL with an authentication token:
http://localhost:8888/lab?token=abc123...Keep the terminal open while you work. Closing it shuts down the JupyterLab server.
Start JupyterLab in a Specific Directory
By default, JupyterLab opens in the directory where you ran the command. To start it in a specific project folder:
jupyter lab --notebook-dir=/path/to/your/projectOn Windows:
jupyter lab --notebook-dir=C:\Users\YourName\Projects\data-analysisThis is useful when you want to keep your JupyterLab file browser focused on a particular project.
Use a Custom Port
If port 8888 is already in use, specify a different port:
jupyter lab --port=9999JupyterLab will then be available at http://localhost:9999/lab.
Start Without Opening the Browser
To start the server without automatically opening a browser window:
jupyter lab --no-browserThis is useful on remote servers or when you prefer to manually navigate to the URL. Copy the URL from the terminal output and paste it into any browser.
Open JupyterLab in a Specific Browser
To force JupyterLab to open in a specific browser:
jupyter lab --browser=firefoxor
jupyter lab --browser=chromeStart JupyterLab on All Network Interfaces
To access JupyterLab from other devices on the same network (e.g., a remote server):
jupyter lab --ip=0.0.0.0 --port=8888 --no-browserThen connect from another machine using the server's IP address.
Launch Summary
| Command | Purpose |
|---|---|
jupyter lab | Start with defaults |
jupyter lab --notebook-dir=/path | Start in a specific directory |
jupyter lab --port=9999 | Use a custom port |
jupyter lab --no-browser | Start without opening browser |
jupyter lab --browser=firefox | Open in a specific browser |
jupyter lab --ip=0.0.0.0 | Listen on all network interfaces |
How to Use JupyterLab
After you open JupyterLab, the interface presents a launcher tab with options to create new notebooks, open a console, start a terminal, or create text files. This section covers essential workflows.
Creating and Running Notebooks
- Click Python 3 under the "Notebook" section in the Launcher, or go to File > New > Notebook.
- Select a kernel when prompted (usually "Python 3").
- A new
.ipynbnotebook opens with an empty code cell.
Type Python code in the cell and press Shift + Enter to execute it. The output appears directly below the cell.
import pandas as pd
import numpy as np
df = pd.DataFrame({
'Name': ['Alice', 'Bob', 'Charlie'],
'Score': [85, 92, 78]
})
dfWorking with Cells
JupyterLab notebooks use two primary cell types:
Code cells: Execute Python (or other kernel language) code. Results display inline.
Markdown cells: Write formatted text using Markdown syntax. Change a cell type using the dropdown in the toolbar or press M in command mode.
To add a new cell, click the + button in the toolbar or press B (below) or A (above) in command mode. Delete a cell by pressing D twice in command mode.
Keyboard Shortcuts
JupyterLab has two modes: Command mode (press Escape, blue cell border) and Edit mode (press Enter, green cell border). Here are the most useful keyboard shortcuts:
| Shortcut | Mode | Action |
|---|---|---|
| Shift + Enter | Both | Run cell, move to next |
| Ctrl + Enter | Both | Run cell, stay in place |
| Alt + Enter | Both | Run cell, insert new cell below |
| A | Command | Insert cell above |
| B | Command | Insert cell below |
| D, D | Command | Delete selected cell |
| M | Command | Change cell to Markdown |
| Y | Command | Change cell to Code |
| C | Command | Copy cell |
| V | Command | Paste cell below |
| X | Command | Cut cell |
| Z | Command | Undo cell operation |
| Shift + M | Command | Merge selected cells |
| Ctrl + S | Both | Save notebook |
| Ctrl + Shift + C | Both | Open command palette |
| Ctrl + B | Both | Toggle left sidebar |
You can customize keyboard shortcuts through Settings > Advanced Settings Editor > Keyboard Shortcuts.
Using the File Browser
The left sidebar contains a file browser that shows the contents of the directory where JupyterLab was started. You can:
- Navigate folders by clicking
- Create new files and folders with right-click context menu
- Upload files by dragging them into the browser
- Rename files with right-click > Rename
- Delete files with right-click > Delete
Built-in Terminal
To open a terminal inside JupyterLab, go to File > New > Terminal or click Terminal in the Launcher. This gives you a full shell (bash, zsh, or PowerShell depending on your OS) without leaving the JupyterLab interface.
The integrated terminal is useful for:
- Installing packages with pip or conda
- Running scripts
- Using Git commands
- Managing files
Multiple Panels and Split View
JupyterLab supports split-screen workflows. Drag any tab (notebook, terminal, file) to the edge of the workspace to create a side-by-side layout. You can arrange panels horizontally or vertically.
Common split-view setups:
- Notebook + Terminal: Write code in a notebook while running commands in a terminal
- Two Notebooks: Compare results side by side
- Notebook + CSV Preview: View data files while coding
- Notebook + Markdown Preview: Write documentation with live preview
JupyterLab Troubleshooting
These are the most common issues users encounter when trying to run JupyterLab, along with their solutions.
"jupyter: command not found"
This means the jupyter executable is not in your system PATH. Common fixes:
Check if JupyterLab is installed:
pip show jupyterlabIf nothing appears, install it:
pip install jupyterlabUse the full Python module path:
python -m jupyter labAdd pip's script directory to PATH (common on Linux/macOS):
export PATH="$HOME/.local/bin:$PATH"Add this line to your ~/.bashrc or ~/.zshrc to make it permanent.
Windows: If you installed Python without checking "Add to PATH," reinstall Python with that option enabled, or manually add C:\Users\YourName\AppData\Local\Programs\Python\Python312\Scripts to your system PATH.
Port Already in Use
If you see "OSError: [Errno 98] Address already in use":
jupyter lab --port=8889Or find and stop the existing Jupyter process:
jupyter lab list
jupyter lab stop 8888On Linux/macOS, you can also find the process using the port:
lsof -i :8888
kill -9 <PID>Permission Errors
If pip install fails with permission errors, avoid using sudo pip install. Instead, use the --user flag:
pip install --user jupyterlabOr better, use a virtual environment (covered below).
Kernel Not Found
If your notebook says "Kernel not found" or the Python kernel is missing:
pip install ipykernel
python -m ipykernel install --userFor a virtual environment kernel:
python -m ipykernel install --user --name=myenv --display-name="Python (myenv)"JupyterLab Will Not Open in Browser
If the server starts but no browser window appears:
- Copy the URL from the terminal output (including the token).
- Paste it directly into your browser.
- If running on a remote server, use SSH port forwarding:
ssh -L 8888:localhost:8888 user@remote-serverThen open http://localhost:8888/lab on your local machine.
JupyterLab Shows a Blank Page
Clear your browser cache or try a different browser. You can also reset JupyterLab's workspace:
jupyter lab --LabApp.default_url='/lab?reset'JupyterLab Extensions
JupyterLab 4.x uses a simplified extension system where most extensions install via pip without requiring Node.js. Here are the most useful extensions for data science work.
jupyterlab-git
Full Git integration inside JupyterLab. View diffs, stage changes, commit, push, and pull without leaving the interface.
pip install jupyterlab-gitAfter installation, a Git tab appears in the left sidebar.
jupyterlab-lsp
Language Server Protocol support that adds autocomplete, hover documentation, go-to-definition, and linting for Python and other languages.
pip install jupyterlab-lsp python-lsp-server[all]jupyterlab_code_formatter
Automatically format code cells using formatters like black or isort.
pip install jupyterlab-code-formatter black isortAfter installation, format cells via the toolbar button or a keyboard shortcut.
Theme Extensions
Customize the JupyterLab appearance:
pip install jupyterlab_darkside_ui # Dark theme
pip install jupyterlab-night # Night themeSwitch themes via Settings > Theme.
Managing Extensions
List all installed extensions:
jupyter labextension listUninstall an extension:
pip uninstall jupyterlab-gitSupercharge Your Data Visualization: PyGWalker
JupyterLab is a powerful environment for writing and running code, but interactive data visualization often requires writing repetitive plotting code. PyGWalker is an open-source Python library that turns any pandas or polars DataFrame into a Tableau-like interactive visualization interface directly inside JupyterLab.
Instead of writing matplotlib or seaborn code for every chart, you can explore your data visually with drag-and-drop:
pip install pygwalkerimport pygwalker as pyg
import pandas as pd
df = pd.read_csv("your_data.csv")
pyg.walk(df)This single command renders an interactive UI where you can create bar charts, scatter plots, histograms, heatmaps, and more without writing plotting code. It supports filtering, aggregation, and multiple chart types -- ideal for exploratory data analysis in JupyterLab.
Learn more at github.com/Kanaries/pygwalker (opens in a new tab).
If you want to go further with AI-powered automation in Jupyter, check out RunCell (www.runcell.dev (opens in a new tab)) -- an AI agent that runs inside Jupyter and automates repetitive notebook tasks like data cleaning, feature engineering, and visualization. It understands your data context and generates code cells for you.
Setting Up JupyterLab in a Virtual Environment
Running JupyterLab inside a virtual environment is the recommended practice. It keeps your project dependencies isolated and avoids conflicts with other Python installations.
Using Python venv
# Create a virtual environment
python -m venv jupyter-env
# Activate it
# macOS/Linux:
source jupyter-env/bin/activate
# Windows:
jupyter-env\Scripts\activate
# Install JupyterLab
pip install jupyterlab
# Start JupyterLab
jupyter labWhen you are done working, deactivate the environment:
deactivateUsing virtualenv
pip install virtualenv
virtualenv jupyter-env
source jupyter-env/bin/activate # macOS/Linux
pip install jupyterlab
jupyter labUsing Conda Environments
conda create --name jupyter-env python=3.12
conda activate jupyter-env
conda install -c conda-forge jupyterlab
jupyter labMaking a Virtual Environment Available as a Kernel
If you have JupyterLab installed globally but want to use packages from a virtual environment, register the environment as a kernel:
# Inside the activated virtual environment:
pip install ipykernel
python -m ipykernel install --user --name=jupyter-env --display-name="Python (jupyter-env)"Now when you create a new notebook in JupyterLab, you can select "Python (jupyter-env)" as the kernel.
Running JupyterLab with Docker
Docker provides a clean, reproducible way to run JupyterLab without installing anything on your host system. The Jupyter project maintains official Docker images.
Quick Start
docker run -p 8888:8888 jupyter/base-notebookThis pulls and runs the base Jupyter image. The terminal output contains a URL with a token. Open that URL in your browser.
Mount a Local Directory
To access your local files inside the container:
docker run -p 8888:8888 -v /path/to/your/project:/home/jovyan/work jupyter/base-notebookOn Windows:
docker run -p 8888:8888 -v C:\Users\YourName\project:/home/jovyan/work jupyter/base-notebookAvailable Docker Images
| Image | Description |
|---|---|
jupyter/base-notebook | Minimal JupyterLab |
jupyter/scipy-notebook | Includes pandas, matplotlib, scipy |
jupyter/datascience-notebook | Python, R, and Julia kernels |
jupyter/tensorflow-notebook | Includes TensorFlow |
jupyter/pyspark-notebook | Includes Apache Spark |
Custom Dockerfile
Create a Dockerfile for a project-specific JupyterLab environment:
FROM jupyter/scipy-notebook:latest
# Install additional packages
RUN pip install pygwalker seaborn scikit-learn
# Set the working directory
WORKDIR /home/jovyan/work
# Expose the Jupyter port
EXPOSE 8888
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]Build and run:
docker build -t my-jupyter .
docker run -p 8888:8888 -v $(pwd):/home/jovyan/work my-jupyterDocker Compose
For projects that combine JupyterLab with other services (databases, APIs):
version: '3'
services:
jupyter:
image: jupyter/scipy-notebook
ports:
- "8888:8888"
volumes:
- ./notebooks:/home/jovyan/work
environment:
- JUPYTER_ENABLE_LAB=yesdocker compose upManaging Multiple Python Kernels
When working on multiple projects with different Python versions or package sets, you can register each environment as a separate kernel in JupyterLab.
Adding a Kernel from a Virtual Environment
# Create and activate a new environment
python -m venv ml-project
source ml-project/bin/activate # macOS/Linux
ml-project\Scripts\activate # Windows
# Install the required packages
pip install ipykernel numpy pandas scikit-learn
# Register this environment as a Jupyter kernel
python -m ipykernel install --user --name=ml-project --display-name="Python (ML Project)"Adding a Kernel from a Conda Environment
conda create --name data-analysis python=3.11 pandas matplotlib
conda activate data-analysis
conda install ipykernel
python -m ipykernel install --user --name=data-analysis --display-name="Python (Data Analysis)"Listing Installed Kernels
jupyter kernelspec listRemoving a Kernel
jupyter kernelspec remove ml-projectSwitching Kernels in a Notebook
Inside an open notebook, click the kernel name in the top-right corner (e.g., "Python 3") and select a different kernel from the dropdown. You can also go to Kernel > Change Kernel in the menu bar.
FAQ
How do I start JupyterLab?
Open a terminal and run jupyter lab. The JupyterLab server starts and your default browser opens automatically. To start in a specific folder, use jupyter lab --notebook-dir=/path/to/folder.
How do I install JupyterLab with pip?
Run pip install jupyterlab in your terminal. Use pip3 on systems where pip points to Python 2. Verify with jupyter lab --version.
How do I install JupyterLab with conda?
Run conda install -c conda-forge jupyterlab. For a clean setup, create a dedicated conda environment first.
What is the difference between JupyterLab and Jupyter Notebook?
JupyterLab is the next-generation interface with multi-panel layout, built-in terminal, file browser, and extensions. Jupyter Notebook is the original single-document interface. JupyterLab is recommended for new projects.
How do I fix "jupyter: command not found"?
Verify the installation with pip show jupyterlab. If installed, try python -m jupyter lab. Otherwise, add the pip scripts directory to your system PATH.
How do I run JupyterLab in a virtual environment?
Create a venv with python -m venv myenv, activate it, install JupyterLab with pip install jupyterlab, and run jupyter lab.
How do I run JupyterLab with Docker?
Run docker run -p 8888:8888 jupyter/base-notebook. Mount local files with the -v flag for persistent storage.
How do I open JupyterLab on a different port?
Use jupyter lab --port=9999 to start on port 9999 instead of the default 8888.
Conclusion
JupyterLab is the standard interactive development environment for Python data science, machine learning, and scientific computing. This guide covered every step from installation to advanced configuration:
- Install JupyterLab with
pip install jupyterlaborconda install -c conda-forge jupyterlab - Start JupyterLab with
jupyter laband customize the launch with flags for port, directory, and browser - Use JupyterLab effectively with keyboard shortcuts, split views, and the integrated terminal
- Troubleshoot common issues like command not found, port conflicts, and kernel errors
- Extend JupyterLab with Git integration, LSP support, and code formatting
- Isolate your setup with virtual environments and Docker for reproducible workflows
Whether you are a first-time Python user or an experienced data scientist setting up a new machine, these steps give you a fully working JupyterLab environment. For interactive data visualization inside JupyterLab, try PyGWalker (opens in a new tab) to turn any DataFrame into a drag-and-drop visual analysis tool.