-
Notifications
You must be signed in to change notification settings - Fork 325
Allow user to pick the 'default' kernel when starting #6290
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
Comments
@cassieview Thanks for the feedback here. Several parts of this sound like a bug that I'm not seeing right now, so apologies, but I might ask a clarifying question or two.
This is true, and I can split this part out as a possible feature request. The current activated environment in CLI is not taken into account when looking for a preferred notebook kernel.
These two sound like symptoms of the same issue. Right now in VS Code - insiders VS Code actually maintains the selection per notebook document so anytime the kernel is manually selected via the kernel picker that should always be preserved, both from the last time VS Code was opened as well as from the last time that the document was opened. I've been playing around with documents some and I'm unable to get this to repro. Opening and closing VS Code, opening and closing document, selecting a new kernel in a different document. In all those cases the previous kernel that I've selected is still the selected kernel. For the case outlined in point (2) could you pull the "Jupyter" logs from the output window? That could help to diagnose what is going on here. |
@cassieview and I chatted offline on this (thanks much Cassie). The CLI launch sounds like something that we have discussed before with regards to kernel launch speed. Basically a way to launch VS Code from an activated environment and make that just the default for all notebooks that are run. Could be interesting as a command line argument, and we wouldn't even need to load the Python extension. For the kernel selection not being preserved I believe the main issue here was that VS code is preserving the kernel association as the workspace level. I'm pretty sure this is intentional, but I totally agree that it's strange to open a different folder level and all of a sudden file kernel associations are lost. Our metadata only help set a preferred kernel, it doesn't perform selection. |
This issue has to do with rethinking how we present kernels to users. So moving to October and marking as iteration-candidate, since I think there is more here overall. |
We've been pulling this issue along for a few milestones. And I believe that the conclusion here is that picking up the env that VS Code is launched in doesn't really match the way that kernel selection is handled in VS Code. Closing this issue down. |
Environment data
Commit: b4c1bd0
Date: 2021-06-09T11:49:36.076Z
Electron: 12.0.9
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19042
OS Version: Windows 10 20H2 OS Build 19042.1052
When using conda envs with vs code the default selected environment on opening vs code doesn't select the expected environment from either the settings.json or the cmd line. This is surfaced in a couple ways:
A common way to select the conda env is thru the cli. However if I activate my conda env in the cli and then open vs code with
code .
it doesn't respect the conda env I had active. This makes using thejupyter notebook
command and going into classic more appealing. It will open Jupyter with my env in my directory with my notebooks ready.Steps to Reproduce:
conda activate myenv
code .
If I open an existing Jupyter notebook in vs code, and select the default conda env. The next time I go into that notebook, it doesn't remember the default env.
Steps to Reproduce:
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)The text was updated successfully, but these errors were encountered: