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.

Kernel picker shows Interpreter instead of selected kernel (as shown in the toolbar)

See original GitHub issue

Environment data

  • VS Code version: 1.55.2
  • Jupyter Extension version (available under the Extensions sidebar): v2021.5.745244803
  • Python Extension version (available under the Extensions sidebar): v2021.3.680753044
  • OS (Windows | Mac | Linux distro) and version: Windows 10 20H2
  • Python and/or Anaconda version: Python 3.6.8 (64 bit)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): NA
  • Jupyter server running: Local | Remote | N/A NA

Expected behaviour

The top right hand section should show 3.6.8 (64 bit)

Actual behaviour

The top right hand section shows 3.7.4 (32 bit)

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Open a ipynb and let it load. The section shows 3.7.4 (32 bit)

we require Python versions older than 3.7 and of 64 bit to run Deep Learning and OpenCV libraries. But after a recent update, I’ve found that the selected kernel is shown as 3.7.4 (32 bit) in the upper right corner. However when an attempt is made to change the kernel by selecting it, it shows that the current one is 3.6.8 (64 bit) “as it should be”. Seems like it is showing the topmost option out of all available kernels.

Microsoft_Bug_VSCode_kernel

Logs

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

XXX

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
umeshk-unnikcommented, Apr 26, 2021

I’m glad we found the issue. Not so long ago we used to register interpreters as kernels. But recently we stopped and changed the way we find kernels and interpreters to fix stuff like this. I think this kernel was created by us with the wrong info back then.

I’ll close the issue, but feel free to reopen it happens again.

Sure thing. Was a pleasure providing cover fire. Thanks for the prompt response and effective suggestions. Stay Safe.

1reaction
umeshk-unnikcommented, Apr 24, 2021

Here’s a suggestion @umeshk-unnik. Please try moving that python374... kernel to another folder so that the extension doesn’t find it. Then open vscode and on your notebook try selecting your desired kernel on the top right.

Let me know if that fixes it. If it does, maybe we misnamed the python374... kernel.

Well, I renamed the display name and it reflects in the ipynb. However as you suggested, when I remove the entire folder containing the kernel.json file (viz. python374…), all faults seem to be rectified. The notebook runs perfectly like the good ol’ times (with the correct indications).

The files in the Roaming folder seem to be an issue. They mess up the kernel display as well as the options loaded in the kernel selection dropdown as far as I saw. Attaching screen grabs for your reference…

FolderRemovalFromRoaming VoodooInNotebook VoodooInKernelJSON

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kernel Picker Plan #11904 - microsoft/vscode-jupyter - GitHub
Experimental Kernel Picker. A diagram reflecting the workflow with data models for the experimental kernel picker. image. 1. Select Kernel ...
Read more >
Missing Jupyter Notebook Kernels in VSCode - Stack Overflow
This is being done through Jupyter Notebooks which are created/modified using the Jupyter extension installed on a SSH Target through vscode.
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 >
Change an Image or a Kernel - Amazon SageMaker
Choose the image/kernel name in the notebook menu. · From the drop-down list, choose an image and/or a kernel. · Choose Select. ·...
Read more >
KernelExecOnCells library and nbextensions
The library is kernel-language agnostic, as described in the internals section below. ... Whether to add a toolbar button to transform the selected...
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