> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to open JupyterLab with Miniconda

**Purpose**: This guide walks you through installing JupyterLab into a conda environment and opening it in your browser.

**Audience**: Users who have Miniconda installed and are comfortable running conda commands in a terminal. If you're new to conda, start with the [Intro to conda workflows](https://anaconda.com/docs/getting-started/working-with-conda/conda-intro-tutorial.md) tutorial.

> [!NOTE]
>
> Prefer a graphical interface? See [How to open JupyterLab with Anaconda Desktop](https://anaconda.com/docs/anaconda-desktop/tutorials/how-to-open-jupyterlab-desktop) or [How to open JupyterLab with Anaconda Navigator](https://anaconda.com/docs/legacy/anaconda-navigator/tutorials/how-to-open-jupyterlab.md).

## Prerequisites

* Miniconda installed. See the Miniconda [installation guide](https://anaconda.com/docs/getting-started/installation.md) for your platform.
* Basic familiarity with conda commands and your system's terminal.

## Steps

**1. Create and activate a conda environment**

To avoid conflicts with other projects, create a dedicated environment rather than installing into `base`. Include `jupyterlab` in the environment creation command to install it along with Python.

Open Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.) (Terminal on macOS/Linux) and run:

```sh theme={null}
conda create --name jupyter-env python jupyterlab
conda activate jupyter-env
```

Your command line updates to show the active environment name.

**2. Launch JupyterLab**

Start the JupyterLab server:

```sh theme={null}
jupyter lab
```

The terminal prints a startup log and JupyterLab opens automatically in a new tab in your default browser.

> [accordion] Browser didn't open?
>
> Look for lines in your terminal output that look similar to the following:
>
> ```txt Example output theme={null}
>   To access the server, open this file in a browser:
>   file:/Users/username/Library/Jupyter/runtime/jpserver-54072-open.html
>   Or copy and paste one of these URLs:
>   http://localhost:8890/lab?token=...
>   http://127.0.0.1:8890/lab?token=...
>
> ```
>
> Copy one of the URLs and paste it into your browser's address bar to open JupyterLab manually.

**3. Open a notebook in your environment**

In the Launcher, under **Notebook**, click the tile for your environment. It might appear as **Python 3 (ipykernel)** or **Python (your-environment-name)**.

A new notebook opens with your environment's kernel active.

**4. Stop the JupyterLab server**

When you're done, return to the terminal where JupyterLab is running and press Ctrl+C.

The server stops and the JupyterLab tab in your browser becomes unreachable.

## Troubleshooting

Troubleshoot

### Kernel fails to start with "No such file or directory" error

***

<details>
  <summary>Cause</summary>

  A kernel spec is registered in JupyterLab that points to a conda environment that has been renamed, moved, or deleted. JupyterLab still shows the kernel in the selector, but can't find the Python executable at the recorded path.
</details>

***

<details>
  <summary>Solution</summary>

  1. List your registered kernels to find the stale entry:

     ```sh theme={null}
     jupyter kernelspec list
     ```

  2. Remove the stale kernel spec:

     ```sh theme={null}
     jupyter kernelspec remove <KERNEL_NAME>
     ```

     Comments

     Replace \<KERNEL\_NAME> with the name of the stale kernel from the list above.

  3. Activate the environment you want to use and register it as a kernel:

     ```sh theme={null}
     conda activate <ENV_NAME>
     conda install ipykernel
     python -m ipykernel install --user --name <ENV_NAME> --display-name "Python (<ENV_NAME>)"
     ```

     Comments

     Replace \<ENV\_NAME> with the name of your conda environment.

  4. Relaunch JupyterLab. The new kernel appears in the kernel selector.
</details>

## Additional resources

* For help with JupyterLab's interface and features, see [JupyterLab's official documentation](https://jupyterlab.readthedocs.io/en/latest/user/index.html).
* To create, update, or remove conda environments, see [Managing conda environments](https://anaconda.com/docs/getting-started/working-with-conda/environments.md).
* To add packages to your environment, see [Installing conda packages](https://anaconda.com/docs/getting-started/working-with-conda/packages/install-packages.md).
* To use Jupyter Notebooks with Package Security Manager (On-prem), see [Jupyter Notebooks](https://anaconda.com/docs/psm-on-prem/6.8.0/user/notebook.md).
* To use Jupyter Notebooks in the browser without a local installation, see [Anaconda Notebooks](https://anaconda.com/docs/anaconda-platform/notebooks/key-features.md) in the Package Security Manager (Cloud) documentation.

## Feedback

Use the thumbs up **Yes** or thumbs down **No** feedback buttons below to let us know what worked and what didn't. Sharing details about your experience helps us know what to improve.
