question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jupyter Server Fails to launch

See original GitHub issue

Environment data

  • VS Code version: 1.29.1
  • Extension version: 2018.11.0
  • OS and version: macOS 10.14.1 (Mojave)
  • Python version: Anaconda 3.7.0
  • Type of virtual environment used: conda

Actual behavior

When settings.json exists within .vscode and includes a python.pythonPath entry pointing to a conda virtual environment, the jupyter server fails to launch.

If the .vscode folder is deleted, vscode restarted and the same interpreter selected from the menu, the jupyter server starts ok.

Expected behavior

Jupyter server starts and cells execute both when the interpreter is first selected and also when the editor is restarted in the same project.

Steps to reproduce:

  1. Create the following python file in a new folder:
# %%
print("hello")
  1. Execute the cell
  2. Select a conda virtual environment as the interpreter and wait for the kernel to restart
  3. Execute the cell (which should succeed)
  4. Restart vscode in the same folder
  5. Execute the cell - the server fails to start

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

None

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

Jupyter notebook failed to launch.  Error: The Jupyter notebook server failed to launch in time
  | t.onDidNotificationChange | @ | /Applications/Visual…kbench.main.js:2429
  | (anonymous) | @ | /Applications/Visual…kbench.main.js:2429
  | e.fire | @ | /Applications/Visual…rkbench.main.js:183
  | t.notify | @ | /Applications/Visual…kbench.main.js:2484
  | t.notify | @ | /Applications/Visual…kbench.main.js:3530
  | e._showMessage | @ | /Applications/Visual…kbench.main.js:3242
  | e._showMessage | @ | /Applications/Visual…kbench.main.js:3241
  | e.$showMessage | @ | /Applications/Visual…kbench.main.js:3241
  | t._doInvokeHandler | @ | /Applications/Visual…kbench.main.js:3278
  | t._invokeHandler | @ | /Applications/Visual…kbench.main.js:3278
  | t._receiveRequest | @ | /Applications/Visual…kbench.main.js:3277
  | t._receiveOneMessage | @ | /Applications/Visual…kbench.main.js:3276
  | (anonymous) | @ | /Applications/Visual…kbench.main.js:3273
  | e.fire | @ | /Applications/Visual…rkbench.main.js:183
  | a | @ | /Applications/Visual…rkbench.main.js:337
  | n._socketDataListener | @ | /Applications/Visual…rkbench.main.js:338
  | emitOne | @ | events.js:116
  | emit | @ | events.js:211
  | addChunk | @ | _stream_readable.js:263
  | readableAddChunk | @ | _stream_readable.js:250
  | Readable.push | @ | _stream_readable.js:208
  | onread | @ | net.js:594

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rchiodocommented, Dec 5, 2018

This should be fixed now that we generate our own config to use with jupyter. See this PR microsoft/vscode-python#3558 You can try it out in our insiders build

0reactions
meatballscommented, Dec 4, 2018

So, I suspect this is something to do with me not having jupytext installed in either the base conda or the virtual env (not sure which at the moment).

It’s odd that it all behaves perfectly when the virtual env is first selected as the interpreter but not if the .vscode setting already exists - but my problem is fixed, so I’m happy!!

Thanks for the pointer @rchiodo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter Server Fails to launch · Issue #3758 - GitHub
Steps to reproduce: · Execute the cell · Select a conda virtual environment as the interpreter and wait for the kernel to restart...
Read more >
Managed Jupyter Server fails to start in 2021.2 - YouTrack
Create a new Python 3.9 virtualenv and install necessary dependencies (among them jupyter, notebook, and jupyterlab). Open a Jupyter Notebook file. Attemp to ......
Read more >
Jupyter server failed to start - Support - PYNQ
My PYNQ System works, except it can't start my jupyter server anymore. I am connected to my Ultra96-V2 Board logged in over the...
Read more >
DataSpell: Jupyter server failed to start - Stack Overflow
You just have to set a Python Interpreter for the project. Preferences -> Python Interpreter (under Project Workspace) -> Select or Add an ......
Read more >
Jupyter notebook browser page not loading
Any ideas what the problem could be? i've run out of ideas. Thanks! lysoifer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found