You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"The version of Python associated with the selected kernel is no longer supported." #22877
20:45:44.076 [info] Starting Kernel startUsingPythonInterpreter, .jvsc74a57bd06aa9a930b94239702003b1d5483aca273205853dc0a175a13e8fde3b74aafeaf.~/miniconda3/envs/python311/python.~/miniconda3/envs/python311/python.-m#ipykernel_launcher (Python Path: ~/miniconda3/envs/python311/bin/python, Conda, python311, 3.1.0) for '~/Code/crypto-quotes/notebooks/2. Data analysis/Analyse crypto quotes.ipynb' (disableUI=true)
Notice the "3.1.0". This is weird, because my Conda environment runs version 3.12. I also completely reinstalled Miniconda and setup multiple environments using Python 3.10, 3.11 and 3.12 and all give the same error.
changed the title [-]Message "Version of Python no longer supported"[/-][+]"The version of Python associated with the selected kernel is no longer supported."[/+]on Feb 7, 2024
Transferring to Python extension repo as this version information is returned by Python extensxion. Kartik Raj (@karrtikr) A similar issue was reported by Luciana Abud (@luabud) , looks like the version information returned is incorrect at some stage.
Suffering from the same problem. It also appears to result in the kernel crashing after a while with miniconda, whereas with venv environments everything is OK.
Bryan Chen (@ProcedureOriented) Can you please install the latest pre-release and provide me with the Python debug level logs after running Python: Clear cache command?
Kartik Raj (@karrtikr)
Hi, here are Python and Jupyter logs, log level is Trace.
Python: v2024.3.10581547 (pre-release)
Jupyter: v2024.1.2024012502 (pre-release)
Bryan Chen (@ProcedureOriented) Great, it seems that this portion is returning the version as "{"major":3,"minor":1,"micro":-1}" when "/opt/homebrew/Caskroom/miniforge/base/envs/py312/bin/python" is passed into it which is the cause.
Can you provide the contents of "/opt/homebrew/Caskroom/miniforge/base/envs/py312/bin" directory? We're primarily interested in all the python binaries present inside the directory, based on whose filenames, we figure an approximate version.
Kartik Raj (@karrtikr)
Here it is. Btw I noticed there are alias named python, python3, and python3.1 in it. I guess whether the alias cause the bug. ls_la.txt
Yep, "python3.1" is an incorrect naming for that alias which is causing the bug. The tool which created the alias likely didn't account for multidigit minor versions, which is leading to the bug. I advise to either change the name or file an issue on miniforge.
Activity
luukburger commentedon Feb 7, 2024
I see this in my logs:
20:45:44.076 [info] Starting Kernel startUsingPythonInterpreter, .jvsc74a57bd06aa9a930b94239702003b1d5483aca273205853dc0a175a13e8fde3b74aafeaf.~/miniconda3/envs/python311/python.~/miniconda3/envs/python311/python.-m#ipykernel_launcher (Python Path: ~/miniconda3/envs/python311/bin/python, Conda, python311, 3.1.0) for '~/Code/crypto-quotes/notebooks/2. Data analysis/Analyse crypto quotes.ipynb' (disableUI=true)Notice the "3.1.0". This is weird, because my Conda environment runs version 3.12. I also completely reinstalled Miniconda and setup multiple environments using Python 3.10, 3.11 and 3.12 and all give the same error.
luukburger commentedon Feb 7, 2024
And now I also completely removed and reinstalled VS Code and the issue persists.
This only started occurring suddenly today, so maybe it has to do with an upgrade of the extension or of VS Code...?
luukburger commentedon Feb 7, 2024
Hmm, you also see the version being interpreted incorrectly in the kernel selector. Notice the 3.1...
[-]Message "Version of Python no longer supported"[/-][+]"The version of Python associated with the selected kernel is no longer supported."[/+]DonJayamanne commentedon Feb 8, 2024
Transferring to Python extension repo as this version information is returned by Python extensxion.
Kartik Raj (@karrtikr) A similar issue was reported by Luciana Abud (@luabud) , looks like the version information returned is incorrect at some stage.
kjarus1 commentedon Feb 10, 2024
Suffering from the same problem. It also appears to result in the kernel crashing after a while with miniconda, whereas with venv environments everything is OK.
MarkSomogyvari commentedon Feb 12, 2024
I had the same issue. I rolled back to the previous jupyter extension version in VSCode (v2024.1.0), and that solved the problem for me for now.
karrtikr commentedon Feb 12, 2024
For folks running into the issue, can you please provide the debug logs?
Developer: Set log levelcommandTraceDeveloper: Reload WindowcommandOutput for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)47 remaining items
DonJayamanne commentedon Feb 27, 2024
Log best effort versions calculated for an environment (#22980)
karrtikr commentedon Feb 27, 2024
Bryan Chen (@ProcedureOriented) Can you please install the latest pre-release and provide me with the Python debug level logs after running
Python: Clear cachecommand?ProcedureOriented commentedon Feb 28, 2024
Kartik Raj (@karrtikr)
Hi, here are Python and Jupyter logs, log level is Trace.
Python: v2024.3.10581547 (pre-release)
Jupyter: v2024.1.2024012502 (pre-release)
Python.log
1-Jupyter.log
karrtikr commentedon Feb 28, 2024
Bryan Chen (@ProcedureOriented) Great, it seems that this portion is returning the version as "{"major":3,"minor":1,"micro":-1}" when
"/opt/homebrew/Caskroom/miniforge/base/envs/py312/bin/python"is passed into it which is the cause.vscode-python/src/client/pythonEnvironments/common/commonUtils.ts
Lines 218 to 233 in d0a07de
Can you provide the contents of "/opt/homebrew/Caskroom/miniforge/base/envs/py312/bin" directory? We're primarily interested in all the python binaries present inside the directory, based on whose filenames, we figure an approximate version.
ProcedureOriented commentedon Feb 28, 2024
Kartik Raj (@karrtikr)
Here it is. Btw I noticed there are alias named python, python3, and python3.1 in it. I guess whether the alias cause the bug.
ls_la.txt
karrtikr commentedon Feb 28, 2024
Yep, "python3.1" is an incorrect naming for that alias which is causing the bug. The tool which created the alias likely didn't account for multidigit minor versions, which is leading to the bug. I advise to either change the name or file an issue on miniforge.
This is why version can only be best effort guess and not always reliable cc/ Don Jayamanne (@DonJayamanne)
Closing this as cause for the bug lies somewhere else, thanks for all the help Bryan Chen (@ProcedureOriented) .
Add more validation checks when accessing envs from cache (#22966)