Skip to content

Instantly share code, notes, and snippets.

@timerring
Created November 8, 2024 06:31
Show Gist options
  • Select an option

  • Save timerring/0a12ff9955702b465367a1d11a62f6ba to your computer and use it in GitHub Desktop.

Select an option

Save timerring/0a12ff9955702b465367a1d11a62f6ba to your computer and use it in GitHub Desktop.

How to run jupyter on vscode

Config the kernel

  1. activate your virtual enviroment and install ipykernel
    pip install --upgrade ipykernel
  2. install the kernel in the env
    conda install -n envName ipykernel
  3. config the kernel
    python -m ipykernel install --user --name envName --display-name "envName"

Config the vscode

  1. add the Jupyter extension.
  2. open a .ipynb file and click the env button on the upper right corner.
  3. select the env you have installed the kernel.

Appendix:

Show all the kernel

jupyter kernelspec list

Remove the kernel

jupyter kernelspec uninstall envName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment