Adding Environments to JupyterLab

Source: https://janakiev.com/blog/jupyter-virtual-envs/

  1. Activate the environment: conda activate my_env
  2. Install ipykernel in your environment. Using:
    • pip install --user ipykernel
    • conda install -c conda-forge ipykernel
  3. Run the following to add the current kernel1 to jupyterlab installation in base environment:
    python -m ipykernel install --user --name=udemy-data-science
    

Removing Environments from JupyterLab

  • Check the list using:
    jupyter kernelspec list
    
  • Remove a kernel using:
    jupyter kernelspec uninstall myenv
    

  1. So don’t forget to activate the environment first. ↩︎