Jupyter server crashed. Unable to connect. Error code from jupyter: 1"
Asked Answered
U

4

7

I keep getting this error message when trying to run the python interactive window in VS Code. I have tried this on another laptop with no issue but for some reason, it happens on my other laptop. The error message is:

"Executing code failed : Error: Jupyter server crashed. Unable to connect. 
Error code from jupyter: 1"

I've tried uninstalling VS Code, uninstalling the python extension, researching the error code online, but no luck.

Uvulitis answered 18/9, 2019 at 0:23 Comment(4)
Perhaps you already have something running on port 8888 which Jupyter uses by default. I doubt it though.Rosary
How would check that?Uvulitis
Hey @sethtjf. I'm a developer on this extension. I have a couple of things that could help to diagnose this. 1. First off, you are launching jupyter from your selected python environment in VSCode when you use the interactive window. When using that same environment outside of vscode (from the command like) can you run jupyter notebook and get a valid server? 2. If your answer to #1 is yes, can you also look at your console log in VSCode. Just try to run the interactive window and copy out what you see in Help->Toggle Developer Tools in the console window.Yokel
Hi Ian, thank you for your response. I am not able to launch jupyter from the command line and connect to a server.Uvulitis
R
14

I had a similar issue. I had to configure a setting in the VSCODE command palette.

"Python: Select Interpreter to Start Jupyter server"

and select an environment with Jupyter installed, to allow vscode to start the server.

https://github.com/microsoft/vscode-python/issues/11048 (see comment on 9th April)

Riddle answered 17/5, 2020 at 18:30 Comment(2)
thanks this fixes it. had an issue with a venv that although had all the jupyter packages installed, failed to start up.Fetishism
This worked for me too, but on Mac I had to write: "Jupyter: Select Interpreter to start Jupyter server" in the command palette and select my virtual environment.Verein
H
3
sudo -H pip install jupyter

This is your solution. I was have same problem.

Hopping answered 20/2, 2023 at 23:30 Comment(2)
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From ReviewGlorygloryofthesnow
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Pointenoire
B
2

In VS Code you can go to command palette by ctrl+shift+P and type jupyter and you will get a dropdown and select filter kernels it should activate your jupyter sessions.

Backwoods answered 11/2, 2023 at 17:8 Comment(0)
R
0

Run this on the terminal and this should solve the problem.

pip install jupyter
Ree answered 16/3, 2023 at 19:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.