Freddy J
Freddy J

Reputation: 137

VS Code on Mac OS X: Failed to start Jupyter in the environment

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:

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.

Upvotes: 2

Views: 1291

Answers (1)

MingJie-MSFT
MingJie-MSFT

Reputation: 9239

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.

Upvotes: 3

Related Questions