Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't see or select Jupyter kernel's from Kernel drop-down #7706

Closed
bnapora opened this issue Sep 28, 2021 · 9 comments
Closed

Can't see or select Jupyter kernel's from Kernel drop-down #7706

bnapora opened this issue Sep 28, 2021 · 9 comments
Labels
bug Issue identified by VS Code Team member as probable bug notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) verified Verification succeeded
Milestone

Comments

@bnapora
Copy link

bnapora commented Sep 28, 2021

Issue Type: Bug

Can no longer select jupyter kernel in virtual environments created outside of /usr directory. In previous version other jupyter kernels would appear in list after restarting VSCode. (Seems to have stopped working with version 1.6, but not certain.) Now the only way to get Notebook to work with selected kernel is to first open notebook in Jupyter Labs (or Notebook), then select the appropriate kernel, save notebook, and then open notebook in VSCode.

Steps:
1.) Create 2 or more virtual environments using "venv"
2.) Install ipykernel in each environment
3.) Configure ipykernel environment name
4.) Open Jupyter notebook and attempt to select or locate no environment
5.) New environment is not displayed and no method to locate or add it.

Suggestion:
Configure VSCode to use same kernelspec as Jupyter, for selecting kernels.

Extension version: 2021.8.2041215044
VS Code version: Code 1.60.2 (7f6ab5485bbc008386c4386d08766667e155244e, 2021-09-22T12:00:31.514Z)
OS version: Windows_NT x64 10.0.22458
Restricted Mode: No
Remote OS version: Linux x64 5.10.43.3-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz (12 x 2808)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 63.73GB (44.40GB free)
Process Argv --crash-reporter-id 751cf961-6f23-4f32-a920-1a73dd86b219
Screen Reader no
VM 18%
Item Value
Remote SSH: mltooling-localhost
OS Linux x64 5.10.43.3-microsoft-standard-WSL2
CPUs Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz (12 x 2808)
Memory (System) 31.22GB (24.93GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vstes627:30244334
pythonvspyt639:30300192
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
vsccppwtct:30364498
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt2:30371810
dockerwalkthru:30370836
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30364666
pythonvspyt187:30373474
pydsgsc2:30361791

@IanMatthewHuff
Copy link
Member

@bnapora Could you please try downloadin VS Code - Insiders (version number should be 1.61.0) and checking this scenario quick? That should get you the newest version of our bits, and I believe this is a bug that has been addressed already. It's a safe SxS install with VS Code - Stable, so it won't mess anything up with your current install.

@greazer greazer added info-needed Issue requires more information from poster notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) and removed needs-triage labels Sep 30, 2021
@bnapora
Copy link
Author

bnapora commented Oct 1, 2021

@IanMatthewHuff I will have to fix my vscode insiders install before I can test this is issue. All of my python envs are in SSH Targets. Currently can't open any of my SSH Targets in Insiders build, because I get an "EISDIR: illegal operation on a directory, read" when it tries to open the SSH config file.

Thanks for the quick response and for the suggestion

@greazer greazer added the bug Issue identified by VS Code Team member as probable bug label Oct 9, 2021
@DonJayamanne
Copy link
Contributor

5.) New environment is not displayed and no method to locate or add it.

As a temporary work around, you can:

  • Find where python is installed
  • Select the command Python: Select Interpreter
    • Next select Enter interpreter path
    • Next enter the path into the input box and hit Enter

This interpretr will now work in VS Code and you might need to re-load VS Code just once more to get it workign in jupyter extension.
We're currently working on ensuring users don't need to re-load vscode to detect the environments in jupyter #5319

@rchiodo
Copy link
Contributor

rchiodo commented Nov 5, 2021

This should be fixed now.

@rchiodo rchiodo closed this as completed Nov 5, 2021
@rchiodo rchiodo removed the info-needed Issue requires more information from poster label Nov 5, 2021
@rchiodo rchiodo added this to the November 2021 milestone Nov 5, 2021
@roblourens roblourens added the verification-steps-needed Steps to verify are needed for verification label Dec 1, 2021
@roblourens
Copy link
Member

What are the steps to verify what you fixed? The steps in the OP seem pretty generic

@rzhao271 rzhao271 added verified Verification succeeded and removed verification-steps-needed Steps to verify are needed for verification labels Dec 6, 2021
@cpoptic
Copy link

cpoptic commented Jun 9, 2022

This issue continues to persist in VS Code Jupyter notebooks, as of June 2022. Please re-open this issue until is is solved in a reliable way. This issue has been present in VS Code Jupyter extension for several years now, as evidenced by a litany of GitHub issues mentioning it.

@IanMatthewHuff IanMatthewHuff removed their assignment Jun 9, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Jun 9, 2022

This issue continues to persist in VS Code Jupyter notebooks, as of June 2022. Please re-open this issue until is is solved in a reliable way. This issue has been present in VS Code Jupyter extension for several years now, as evidenced by a litany of GitHub issues mentioning it.

@cpoptic Can you be more specific? Or perhaps open a new issue. What exactly doesn't work?

Creating kernels using this will show them in the kernel dropdown:

python -m ipykernel install --name "custom-kernel-name" --user

image

Granted it takes a reload but it should find it eventually.

@danielaiyuan
Copy link

@rchiodo When I modify the virtual environments through Anaconda, removing one virtual environment and creating one new, the new virtual environments cannot provide a stable jupyter kernel for editing. The new interpreter disappears from the jupyter kernel options every time after creating a new .ipynb file in vs code, restarting vs code or re-activating the virtual environments do not help. Occasionally, everything works normal, for instance, after I run a python file with the new python interpreter in vs code, but this method is not reproducible.

@DonJayamanne
Copy link
Contributor

@danielaiyuan
Please could you try using the latest pre-release version of Jupyter extension and installing the latest insider versino of VS Code.
If that still doesn't work, please file an issue and we'd be happy to look into that.

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

9 participants