A notebook authored using VSCode built-in editor fails to build.
Steps to reproduce the behavior:
- Use VSCode built-in editor/support to write your Jupyter Notebook
- Make sure to execute at least one cell in VSCode
- Issue
jupyter-book build .
This results in build failing with an exception/error - "NoSuchKernel ..." Here is a trace of the error stack

Environment
- Python Version 3.7.8 in virtualenv
- Package versions : jupyter-book 0.8.2
- Operating System: macOS
- IDE: VSCode
Workaround
Here is how I work around this issue-
Open the notebook in raw mode (i.e. json file) and remove kernelspec section. For e.g.
I go to the location where I have below shown json blob
"orig_nbformat": 2,
"kernelspec": {
"name": "Python 3.7.8 64-bit ('prmlenv': venv)",
"display_name": "Python 3.7.8 64-bit ('prmlenv': venv)",
"metadata": {
"interpreter": {
"hash": "ec5a04176abb2f15087dd010db8344c4d46cfabf8263c1804b67e1f772428e7e"
}
}
}
I then delete the whole kernelspec
This makes jupyter-book build happy.
Needless to say, it adds/introduces an extra step for me per notebook.
I am not sure if it is VSCode at fault here or jupyter-book is not able to find the appropriate kernel. Note that both use the same virtualenv.
Regards
Kapil
A notebook authored using VSCode built-in editor fails to build.
Steps to reproduce the behavior:
jupyter-book build .This results in build failing with an exception/error - "NoSuchKernel ..." Here is a trace of the error stack
Environment
Workaround
Here is how I work around this issue-
Open the notebook in raw mode (i.e. json file) and remove
kernelspecsection. For e.g.I go to the location where I have below shown json blob
I then delete the whole
kernelspecThis makes jupyter-book build happy.
Needless to say, it adds/introduces an extra step for me per notebook.
I am not sure if it is VSCode at fault here or jupyter-book is not able to find the appropriate kernel. Note that both use the same virtualenv.
Regards
Kapil