After the latest update of VSCode, I can't run Jupyter notebooks anymore
Asked Answered
B

2

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
Benniebenning answered 7/2, 2023 at 18:22 Comment(3)
Does this answer your question? Unable to start Jupyter Notebook Kernel in VS CodeImitable
No as I explained in the question I tried all those steps. none worked for me.Benniebenning
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). 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).Imitable
S
0

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

Systole answered 10/2, 2023 at 0:32 Comment(1)
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.Benniebenning
P
1

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).

Propagable answered 8/2, 2023 at 21:58 Comment(2)
I was not as lucky as you were. I tried switching to the pre-release version but it didn't work.Benniebenning
after trying all solutions, this worked for meMorra
S
0

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

Systole answered 10/2, 2023 at 0:32 Comment(1)
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.Benniebenning

© 2022 - 2024 — McMap. All rights reserved.