Jupyter Server Fails to launch
See original GitHub issueEnvironment 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:
- Create the following python file in a new folder:
# %%
print("hello")
- Execute the cell
- Select a conda virtual environment as the interpreter and wait for the kernel to restart
- Execute the cell (which should succeed)
- Restart vscode in the same folder
- Execute the cell - the server fails to start
Logs
Output for Python
in the Output
panel (View
→Output
, 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:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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