1

After updating VSCode, I have been unable to run Jupyter notebooks anymore. I am using VSCode on a MacBook Pro Max M1 and am encountering the following error:

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: kernel kernelspec migrate run troubleshoot

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

Unfortunately, none of the steps I tried have worked.

I am using January 2023 (version 1.75) release and extension versions are as follows:

  • Python v2023.2.0
  • Jupyter v2023.1.2010391206

Has anyone else faced this issue? I would greatly appreciate any suggestions or solutions.

Thank you!

I have tried a number of steps to resolve the issue, including:

  1. Making sure that jupyter-notebook is running in the terminal
  2. Installing Jupyter in new conda and Python virtual environments
  3. Removing VSCode and its related directories completely and downloading it again
  4. Trying the "Switch to Pre-Release Version" for both Jupyter and Python extensions in VSCode
  5. Tried updating jupyter and notebook libraries
  6. Tried running VSCode with code --no-sandbox
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 1
    Does this answer your question? [Unable to start Jupyter Notebook Kernel in VS Code](https://stackoverflow.com/questions/75330032/unable-to-start-jupyter-notebook-kernel-in-vs-code) – starball Feb 07 '23 at 18:27
  • No as I explained in the question I tried all those steps. none worked for me. – Mohammad Khalkhali Feb 07 '23 at 20:38
  • If you tried the steps from an existing question and they didn't work, if you are not wholly convinced that you are experiencing a _different_ problem than the one in the existing questions, you should just wait for more answers to come, follow them, and consider placing a bounty (see [/help/no-one-answers](/help/no-one-answers)). If you are conviced you have a different question, then link to those related questions and explain _why/how_ your question is different, and _link_ to those questions in yours. It's in your own interest after all to avoid wrong dup closures (if actually wrong). – starball Feb 07 '23 at 22:14

2 Answers2

0

I ran into this too. I was able to work around it by switching the Jupyter extension to the pre-release version (which was a suggestion in a different question that I can't find anymore).

0

solved downgrading to previous version (November 2022) then updating to latest version again. Running same Python and Jupyter version. Good luck

  • I installed the November 2022 version and it works fine but when I updated it to the latest version the issue came back. I guess I will downgrade to November 2022 version and won't update unless I have to! Thanks for the suggestion. – Mohammad Khalkhali Feb 10 '23 at 18:29