RunCell.dev

How to open Jupyter from the terminal (Windows and macOS)

1. TL;DR

Already have Jupyter installed? Run one of these in your terminal:

# JupyterLab (recommended)
jupyter lab

# Classic Notebook (optional)
jupyter notebook

If the command isn’t found, try:

python -m jupyterlab
# or
python -m notebook

Need to install Jupyter first? See the installation guide.


2. Prerequisites

  • Jupyter installed in the environment you plan to use
  • A terminal: PowerShell/Command Prompt/Anaconda Prompt (Windows) or Terminal (macOS)
  • Optional but recommended: a virtual environment (venv, conda, or uv)

3. Windows

3.1 Choose the right terminal

  • If you used Anaconda/Miniconda: open Anaconda Prompt (or PowerShell) and conda activate your-env
  • If you used pip/venv: open PowerShell or Command Prompt and activate your venv
# In your project directory
python -m venv .venv
.\.venv\Scripts\activate
pip install jupyterlab
jupyter lab

3.2 Launch

jupyter lab          # recommended UI
# or
jupyter notebook     # classic UI

If jupyter isn’t recognized:

python -m jupyterlab
# or, use the full path inside the venv
.\.venv\Scripts\jupyter-lab.exe

When prompted by Windows Firewall, click Allow access. Your browser will open at http://localhost:8888/lab (or it will print a URL with a token—copy/paste it into the browser).

3.3 Open a specific folder or notebook

jupyter lab path\to\your\project
jupyter lab path\to\notebook.ipynb

3.4 Common checks

where jupyter          # which executable will run
jupyter lab --version  # verify Lab is installed
jupyter --paths        # see config/data dirs

4. macOS

Open the Terminal app. If you’re using a virtual environment, activate it first.

cd /path/to/project
python -m venv .venv
source .venv/bin/activate
pip install jupyterlab
jupyter lab

If jupyter isn’t found:

python -m jupyterlab
# or
~/.venv/bin/jupyter-lab  # adjust path if using a different venv location

Your default browser will open at http://localhost:8888/lab. If it doesn’t, copy the URL (with token) printed in the terminal and open it, or run:

open http://localhost:8888/lab

Open a specific folder or notebook:

jupyter lab /path/to/project
jupyter lab /path/to/notebook.ipynb

Quick checks:

which jupyter
jupyter lab --version
jupyter --paths

5. Useful options (both Windows and macOS)

  • Start on a different port:
jupyter lab --port 9000
  • Don’t open a browser (useful on a remote or headless machine):
jupyter lab --no-browser
  • Run in the background and log to a file:
# macOS / Linux
jupyter lab --no-browser > lab.log 2>&1 &

# Windows (PowerShell)
Start-Process jupyter -ArgumentList 'lab --no-browser' -NoNewWindow
  • Open a specific working directory:
jupyter lab /path/to/your/workspace

6. Troubleshooting

  • “jupyter: command not found” or “not recognized”

    • Activate the right environment first
    • Try python -m jupyterlab
    • Reinstall in the active env: pip install -U jupyterlab
  • Browser doesn’t open automatically

    • Copy the http://localhost:8888/... URL with the token from the terminal
    • Or open manually: macOS open http://localhost:8888/lab, Windows start http://localhost:8888/lab
  • Wrong environment (extensions/packages missing)

    • Check paths: which jupyter (macOS) or where jupyter (Windows)
    • Ensure python, pip, and jupyter point to the same env
  • Want a password instead of a token?

    • Set one once: jupyter server password
  • Port already in use

    • Pick another: jupyter lab --port 9001

If you still can’t launch Jupyter, revisit the installation guide to confirm your environment is set up correctly.