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.

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

See original GitHub issue

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.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Qiuzhuangcommented, Nov 4, 2021

Yes, this is working perfectly now. Thank you.

1reaction
rchiodocommented, Sep 26, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Jupyter Notebook in Windows Subsystem Linux ...
We are going to see how to: Install and configure a WSL2; Install and configure Windows Terminal; Install Miniconda and common libraries; Launch...
Read more >
Cannot use ROOT in a Jupyter notebook - Newbie
The problem seems to be that your Jupyter notebook is running with Python3.8, but the installation of ROOT that you are using has...
Read more >
Windows Subsystem for Linux (WSL 2) and Jupyter Lab
You can access the Linux files by modifying the configuration file. You'll need to allow root access and specify the Jupyter Notebook directory....
Read more >
What to do when things go wrong - The Jupyter Notebook
If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal or command prompt and running the command...
Read more >
Working with Jupyter Notebooks in Visual Studio Code
To work with Python in Jupyter Notebooks, you must activate an Anaconda environment in VS Code, or another Python environment in which you've...
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