-
Notifications
You must be signed in to change notification settings - Fork 294
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
Interpreter always falling back to default in Jupyter notebook #13907
Comments
did you restart your kernel for pylance? From your log it looks like you already using correct kernel in notebook.
|
I tried restarting multiple times. I'm not sure I understand what you mean: the kernel and the interpreter should be two different things. |
Yes, I have the feeling it started working weirdly since the last 2 or 3 major updates...they definitely changed something in the jupyter extension and of course made it even worse. For me it is totally random: sometimes it does work after a while, sometimes it never works. Scrolling through a notebook sometimes makes the language server restarts... It has become just sluggish and really unstable. |
I looked at my
|
@guidocioni I found a workaround. After create your notebook, save it to proper root directory (if you have multi root as I did). Then restart your vscode, it works again. It looks like change the interpreter on the fly for notebook does not work.
|
@braindevices @guidocioni Are you still running into this issue? |
I still see it and worse my work around at #13907 (comment) does not work some time. If I restart the vscode, sometimes it works again. VS Code version: 1.85.1 |
Hey @DonJayamanne, this issue might need further attention. @guidocioni, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
@braindevices Are you still running into this issue with the latest versions? |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Applies To
What happened?
I have two different conda environments (
default
,wetterdienst
) which I want to obviously use as two different intepreters in Vscode.When opening a Python file I can switch back and forth between the two different interpreters without issues.
For example here is an example of importing a package from the interpreter where it is installed
and where it is not I do see an error
Instead, in a Jupyter notebook
This happens because, regardless of the interpreter chosen, Vscode is still using the interpreter of the "default" conda environment, which I can see if I try to import a package that exists in both.
in this case it should take the
pandas
version installed in thewetterdienst
conda environment.NOTE: this has nothing to do with the actual execution of the Notebook, which depends on the Kernel, and it is working as expected. I don't understand why the kernel and interpreter versions in vscode-jupyter are allowed to be different...what is the sense in that?
VS Code Version
Version: 1.80.0 (Universal) Commit: 660393deaaa6d1996740ff4880f1bad43768c814 Date: 2023-07-04T13:39:33.766Z Electron: 22.3.14 ElectronBuildId: 21893604 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin x64 22.5.0
Jupyter Extension Version
v2023.6.1101941928
Jupyter logs
Coding Language and Runtime Version
No response
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Local
The text was updated successfully, but these errors were encountered: