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.

VSC fails to connect to (any) python kernel.

See original GitHub issue

After the upgrade to the latest VSC version on Linux Ubuntu 20.04 I cannot run any jupyter notebook. When I run any cell, using any environment (that used to work till the previous version), VSC seems to fail connecting to the python kernel, a dialog shows up and says:

Connecting to kernel: base (Python 3.9.5): Activating Python Environment 'Python 3.9.5 ('base')'

It never disappears.

Environment data

  • VS Code version:
Version: 1.69.0
Commit: 92d25e35d9bf1a6b16f7d0758f25d48ace11e5b9
Date: 2022-07-07T08:29:47.439Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Linux x64 5.13.0-52-generic
  • Jupyter Extension version (available under the Extensions sidebar):
v2022.6.1001902341
  • Python Extension version (available under the Extensions sidebar):
v2022.10.0
  • OS (Windows | Mac | Linux distro) and version:
Linux Ubuntu 20.04
  • Python and/or Anaconda version:
conda 4.11.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …):
conda
  • Jupyter server running: Local | Remote | N/A
local

Expected behaviour

Cell is run.

Actual behaviour

Cell is never run, for every conda environment and kernel I can select, I read:

Connecting to kernel: base (Python 3.9.5): Activating Python Environment 'Python 3.9.5 ('base')'

Steps to reproduce:

In my case it is enough to open any jupyter notebook, select any environemnt and run any cell.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
amitbhacommented, Jul 11, 2022

maybe because Jupyter extension is loaded before the Python extension is ready. I reload the jupyter extension, it works

  1. disable jupyter extension
  2. restart vscode
  3. open the .ipynb file
  4. enable jupyter extension
  5. run all
0reactions
DonJayamannecommented, Sep 20, 2022

Closing this issue as its been over 4 weeks, since the information was requested. We’ll be happy to reopen the issue when the requested information has been provided.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python VS code does not connect with IPython kernel
An issue was opened today in the Python VS Code repository that describes a similar problem. Their recommended fix is to close VS...
Read more >
Stuck on "Connecting to kernel" : r/vscode - Reddit
I'm working with vscode to read jupyter notebook file. Today I found out that when I tried to run the code block it...
Read more >
Getting Started | Python in Visual Studio Code
Running a line of code in a kernel. Open a python file; Select a line or a block of code; From the command...
Read more >
How to Fix Kernel Error in Jupyter Notebook
So, a kernel error occurs when Jupyter fails to connect with a specific version of Python. When the system encounters difficulties locating the ......
Read more >
Working with Jupyter Notebooks in Visual Studio Code
To select an environment, use the Python: Select Interpreter command from the Command ... Next, select a kernel using the kernel picker in...
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