If you want to use [[Jupyter Notebook]] in the browser (rather than through [[VS Code]]), install Jupyter Notebook in the `base` environment (we'll go over more on environments later). You might want to do this to take advantage of some of the advanced extensions or if you will be converting notebooks to other formats with `nbconvert`.
> [!NOTE]
> If you installed Anaconda instead of [[miniconda3]] or [[miniforge3]], you already have Jupyter Notebook and you can skip this step. These instructions are for those using minforge3. If using minconda3, simply replace `mamba` with `conda`.
- In [[Git Bash]], ensure the `base` environment is activated by running the command:
```bash
mamba activate base
```
- With the `base` environment active, run the command:
```bash
mamba install notebook
```
- When prompted, input `y` to continue.
- Also install [nb_conda_kernels](https://github.com/Anaconda-Platform/nb_conda_kernels) and [nbconvert](https://nbconvert.readthedocs.io/en/latest/index.html).
```
mamba install nb_conda_kernels
mamba install nbconvert
```
To access the Jupyter Notebook in any new environment, simply install the [[iPython kernel]] in that environment.
> [!NOTE]
> I used to recommend [Jupyter Notebook Extensions](https://towardsdatascience.com/jupyter-notebook-extensions-517fa69d2231), however this package is no longer compatible with newer versions of Jupyter Notebook. If you want to access these extensions, you will need to install [Jupyter Lab](https://jupyter.org/install) or install a lower version of Jupyter Notebook (`notebook==6.4.12`). See [here](https://towardsdatascience.com/jupyter-notebook-extensions-517fa69d2231) for an overview of Jupyter Notebook Extensions.
To run a Jupyter Notebook in [[VS Code]], first install the Jupyter Extension. Then,
- Open VS Code
- Use `Ctrl + Shift + P` to open the command palette
- Begin typing to select `Create: New Jupyter Notebook`
- In the top right corner, use the kerel picker to select the environment you just created.
See [here](https://code.visualstudio.com/docs/datascience/jupyter-notebooks) for more details.
> [!Warning] Avoid installing packages in the base environment
> It's considered bad practice to pollute the base environment with a bunch of packages. You'll want to set up a dedicated environment for each project. If you simply use the base environment for everything, you'll inevitably run into version conflicts that prevent one or another of your projects' code from running. Jupyter Notebook is the exception to this rule.
****