2

Running Jupyter Notebook on the Terminal works:

(tf) jupyter-notebook
[I 17:50:59.285 NotebookApp] Serving notebooks from local directory: ...

The notebook boots up on http://localhost:8888/ and I can run each cell.

Running Jupyter Notebook cell by opening a .ipynb file on VS Code gives:

Failed to start Jupyter in the environment 'tf (Python 3.9.15)'. View Jupyter log for further details.

Log:

error 17:51:15.828: Error in execution (get message for cell) [Er [Error]: 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.

I have the following extensions on VS Code related to Jupyter Notebook:

  • Jupyter
  • Jupyter Keymap
  • Jupyter Slide Show
  • Jupyter Cell Tags
  • Jupyter Notebook Renderers

Running the notebook on VS Code previously always worked. It worked yesterday. I have made 0 configuration changes since EXCEPT downloading necessary TeX extensions for PDF conversion. The same error occurs on every Conda environment, nor does it resolve when I restart my computer.

Freddy J
  • 97
  • 8

1 Answers1

3

This issue has been solved on github.

The solution is to switch to the pre-release version.

Click the in the extension store Switch to Pre-Release Version:

enter image description here

If it still doesn't work, you can choose conda interpreter and retry.

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13
  • This didd't work for me. A workaround is to open a jupyter-lab instance on the project folder and get the url with token and add it as an existing remote Jupyter Server in VS Code. – milindsoorya Feb 08 '23 at 10:17
  • Exactly that worked for me. Installing pre-release was enough to fix this problem. Worked with system, conda and venv kernels. (MacOS 13.2) – kzaw Feb 14 '23 at 09:35