Build conda environment and add Jupyter kernel

Build conda environment

Set up VSCode before moving on!

Make sure you have completed the VSCode set-up before creating the environment.

  1. Open VSCode on your computer.

  2. Download the following YAML file and move it into your eds220-in-class directory: https://github.com/MEDS-eds-220/MEDS-eds-220-course/blob/main/eds220-env.yml

  3. Open a bash terminal inside VSCode and in it:

    1. Verify you are in the eds220-in-class directory.

    2. Verify that the eds220-env.yml file is in the directory.

    3. Run the following conda command to build the environment used for the course:

    conda env create --name eds220-env --file eds220-env.yml

It can take up to a few minutes to build the environment. Once conda has finished, verify that the environment was created by running conda env list.

NUXtocat by cameronfoxly. Octocat is a registered trademark of GitHub, Inc.; the octocat images are not covered by this website’s CC BY-NC 4.0 license.

Add Jupyter kernel

Build the environment before moving on!

Make sure you have built the eds220-env before creating the kernel.

  1. Open VSCode on your computer.

  2. Add a new bash terminal in it.

  3. Verify you have the eds220-env conda environment available by running

conda env list
  1. Activate the eds220-env by running
conda activate eds220-env
  1. Verify the environment has been activated.

  2. Run

python -m ipykernel install --user --name eds220-env --display-name "EDS-220 env"
  1. Verify that the kernel has been created by running
jupyter kernelspec list

The output should look similar to this:

Available kernels:
  eds220-env        /Users/galaz-garcia/Library/Jupyter/kernels/eds220-env
  python3           /Users/galaz-garcia/opt/anaconda3/share/jupyter/kernels/python3
  1. Close and reopen VSCode.

  2. To use the new kernel, open a Jupyter notebook on VSCode and…

Labtocat by JohnCreek. Octocat is a registered trademark of GitHub, Inc.; the octocat images are not covered by this website’s CC BY-NC 4.0 license.