vscode-jupyter: not able to start jupyter notebook imported into python using wsl when running as the root user

Environment data

  • VS Code version: 1.38.1
  • Extension version (available under the Extensions sidebar): Python 2019.9.34911
  • OS and version: windows 10.0.17763
  • Python version (& distribution if applicable, e.g. Anaconda): python 3.7.3 conda 4.7.12
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Relevant/affected Python packages and their versions: XXX
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info microsoft/vscode-python#3977): jedi, but happens both ways

Expected behaviour

Actual behaviour

run cell for this

#%%
import os

gives

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

Steps to reproduce:

  1. open wsl
  2. launch conda environment
  3. open vscode
  4. create .py file with
#%%
import os
  1. run cell

see error message

Logs

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

cwd: /mnt/c/Users/matt/Documents/code/course-v3/nbs/dl-me
##########Linting Output - pylint##########
> ~/anaconda3/bin/python -m jupyter kernelspec list
> ~/anaconda3/bin/python -m jupyter kernelspec list
> ~/anaconda3/bin/python -m jupyter notebook --no-browser --notebook-dir=/tmp/fe814943-4e41-421f-b230-8b5c217dbebe --config=/tmp/fe814943-4e41-421f-b230-8b5c217dbebe/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
> ~/anaconda3/bin/python -m jupyter kernelspec list
> ~/anaconda3/bin/python -m jupyter kernelspec list
> ~/anaconda3/bin/python -m jupyter notebook --no-browser --notebook-dir=/tmp/ccb8d822-bb60-48d3-9f12-937035982aa7 --config=/tmp/ccb8d822-bb60-48d3-9f12-937035982aa7/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0

console

i wasn’t able to find Enable source map support for extension debugging advice?


I'm able to get this working on my mac but would love it on my PC for the GPU.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 17 (9 by maintainers)

Most upvoted comments

Yes, this is working perfectly now. Thank you.

I’d like to leave it open so we can check for root access and warn the user. Thanks.