Home > database >  Unable to start Jupyter Notebook Kernel in VS Code
Unable to start Jupyter Notebook Kernel in VS Code

Time:02-04

I am trying to run a Jupyter Notebook in VS Code. However, I get the following error message when I try to execute a cell:

Failed to start the Kernel. 
Jupyter server crashed. Unable to connect. 
Error code from Jupyter: 1
usage: jupyter.py [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
                  [--paths] [--json] [--debug]
                  [subcommand]

Jupyter: Interactive Computing

positional arguments:
  subcommand     the subcommand to launch

options:
  -h, --help     show this help message and exit
  --version      show the versions of core jupyter packages and exit
  --config-dir   show Jupyter config dir
  --data-dir     show Jupyter data dir
  --runtime-dir  show Jupyter runtime dir
  --paths        show all Jupyter paths. Add --json for machine-readable
                 format.
  --json         output paths as machine-readable json
  --debug        output debug information about paths

Available subcommands:

Jupyter command `jupyter-notebook` not found. 
View Jupyter log for further details.

The Jupyter log referred to by the diagnostic message just contains the same text as the above diagnostic message multiple times.

I believe enter image description here

CodePudding user response:

Do this:

pip install --upgrade --force-reinstall --no-cache-dir jupyter

And then restart VS Code. If you already have it open, you can do this in the VS Code command palette with the Developer: Reload Window command.

Credit: This answer is based on this answer by @Spandana-r to the question After installing with pip, "jupyter: command not found".

  • Related