Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jupyter server : not started, no kernel in vs code

i am trying to use jupyter notebooks from vs code and installed jupyter notebook extension and i am using (base)conda environment for execution. while this happened

Error: Jupyter cannot be started. Error attempting to locate jupyter:
at A.startServer (c:\Users\DELL\.vscode\extensions\ms-python.python-2020.2.63990\out\client\extension.js:1:784356)
at async A.ensureServerAndNotebookImpl (c:\Users\DELL\.vscode\extensions\ms-python.python-2020.2.63990\out\client\extension.js:1:783811)
at async A.ensureServerAndNotebook (c:\Users\DELL\.vscode\extensions\ms-python.python-2020.2.63990\out\client\extension.js:1:783612)
at async A.submitCode (c:\Users\DELL\.vscode\extensions\ms-python.python-2020.2.63990\out\client\extension.js:1:780564)
at async A.reexecuteCell (c:\Users\DELL\.vscode\extensions\ms-python.python-2020.2.63990\out\client\extension.js:75:879318)

status of jupyter notebook

how to resolve this issue ?

like image 283
Cheemakurthi Mukesh Avatar asked Feb 21 '20 01:02

Cheemakurthi Mukesh


People also ask

How do I start a VS Code Jupyter server?

You can create a Jupyter Notebook by running the Jupyter: Create New Jupyter Notebook command from the Command Palette (Ctrl+Shift+P) or by creating a new . ipynb file in your workspace. Next, select a kernel using the kernel picker in the top right.

How do I start kernel in Jupyter Notebook?

You can run the whole notebook in a single step by clicking on the menu Cell -> Run All. To restart the kernel (i.e. the computational engine), click on the menu Kernel -> Restart.

How do I enable Jupyter Notebook extensions in VS Code?

Installing the Jupyter Extension First, launch your VS Code and type “jupyter notebook” in the extension search box. Select the first result (Jupyter) and click on the Install button displayed in the middle of the screen: That's it! Once the installation is done, you already have Jupyter Notebook on your VS Code.


3 Answers

I had exactly the same problem when I installed Visual Studio Code and tried to run some Python code from a jupyter notebook on my fresh Ubuntu 18.04.

How I solved it:

1) Press Command+Shift+P to open a new command pallete

2) Type >Python: Select Intepreter to start jupyter notebook server

3) Open the notebook again

And it worked fine. Hope it works for you.

like image 110
ABarrier Avatar answered Oct 11 '22 16:10

ABarrier


I have several versions of Python installed. It happened the same thing to me and I have fixed it this way. Ctrl+Shift+p and select Python: Select Interpreter to start Jupyter server enter image description here

Then, select the version under the Visual Studio Code enter image description here

Nothing will happen and then press again Ctrl+Shift+p and select Python: Create new blank Jupyter Notebook. And it works

I have even set the Python version to 3.8 at the bottom and it worked too with the new features print(a:=4) despite the fact that the version I have chosen was 3.7.5. Nevertheless, I have to lunch VS Code from Anaconda Navigator.

enter image description here

like image 17
Antonio Velazquez Bustamante Avatar answered Oct 11 '22 16:10

Antonio Velazquez Bustamante


  1. Press Command+Shift+P on mac, Ctrl+Shift+p on windows

  2. Type Jupyter: Select Interpreter to start Jupyterserver

  3. It would show you a dropdown of python versions installed.

  4. I chose python 3.7.5 and it worked for me you can choose the python version installed on your machine.

like image 11
Bodunrin David Avatar answered Oct 11 '22 16:10

Bodunrin David