microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.28k stars 289 forks source link

The version of Python associated with the selected kernel is no longer supported. #15771

Closed jiayuan-shen closed 2 months ago

jiayuan-shen commented 3 months ago

Applies To

What happened?

When I select the kernel, it shows my Python--version is 3.1.undefined or 3.1.-1, but I am using Anaconda for Python version 3.11.7. The Problem could be solved if I disable and reenable the Jupyter Notebook extension every time I open the VSC.

screenshot

I have already attempt reinstall the VSC and Anaconda Navigator but the problem still persist.

VS Code Version

Version: 1.90.1 Commit: 611f9bfce64f25108829dd295f54a6894e87339d Date: 2024-06-11T21:44:54.914Z Electron: 29.4.0 ElectronBuildId: 9593362 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0

Jupyter Extension Version

v2024.5.0

Jupyter logs

No response

Coding Language and Runtime Version

Python 3.11.7

Language Extension Version (if applicable)

Python v2024.9.11661012 (pre-release)

Anaconda Version (if applicable)

Anaconda Navigator 2.6.1, conda 24.5.0

Running Jupyter locally or remotely?

Local

Mirac-Le commented 3 months ago

Same issue here. And I saw that someone reported the issue in this post on Stack Overflow. https://stackoverflow.com/questions/78600912/suddenly-i-got-undefined-python-version-error-in-jupyter-notebook-vscode

jiayuan-shen commented 3 months ago

Same issue here. AndI saw that someone reported the issue in this post on Stack Overflow. https://stackoverflow.com/questions/78600912/suddenly-i-got-undefined-python-version-error-in-jupyter-notebook-vscode

Thanks for your help; I deem this blog triggered me to reset the VSC rather than stick around with Anaconda. If we update the Python version of the 'base' environment in Anaconda, the problem will be solved.

Here is the process: conda activate base conda update conda conda install python=3.11.9

I think it will solve the problem! Thank you!!!

I will keep monitoring whether the problem will occur for several weeks.

NirvanaCh commented 3 months ago

same issue +1 3.12 also recognized as 3.1 just 'Developer: Reload Window', it will randomly change , 3.12 or 3.1

firezym commented 3 months ago

Same issue here. AndI saw that someone reported the issue in this post on Stack Overflow. https://stackoverflow.com/questions/78600912/suddenly-i-got-undefined-python-version-error-in-jupyter-notebook-vscode

Thanks for your help; I deem this blog triggered me to reset the VSC rather than stick around with Anaconda. If we update the Python version of the 'base' environment in Anaconda, the problem will be solved.

Here is the process: conda activate base conda update conda conda install python=3.11.9

I think it will solve the problem! Thank you!!!

I will keep monitoring whether the problem will occur for several weeks.

This does not solve this problem. Still get undefined error.

vatsaldin commented 2 months ago

Facing same issue-

and this is something might be helpful in identifying possible issue

image

DonJayamanne commented 2 months ago

https://github.com/microsoft/vscode-jupyter/issues/15829

Sorry you are running into this issue, unfortunately this is due to an issue with the Python extension. We will try to get to the bottom of this and get this resolved soon,

In the mean time, please ignore this warning message.

SOLUTION (TEMPORARY WORK AROUND)

As a work around, please ignore this warning message.