Specify the specific version required for ipykernel
Dear developers and maintainers, I have the highest respect for your outstanding work.
When I ran a test on python version 3.6.2 with jupyter, I was told that I needed to upgrade ipykernel to connect to the console. Positron reminds me that I need to upgrade ipykernel, but doesn't report the minimum version required, and the automatic installation that the ide tried afterwards undoubtedly failed, after all, 3.6 is indeed a bit outdated.
Nonetheless, I think the minimum version required to report that allows users to install themselves in the terminal is needed.
Thank you for your attention and have a great day!
Thanks for the kind words and interest @Vinnish-A !
We currently support Python 3.8 to 3.12 as seen in the Wiki: https://github.com/posit-dev/positron/wiki#python-prerequisites -- that may be the specific issue you are facing right now.
Thank you for the kind words and for the feedback!
As Tom mentioned, we only support Python >= 3.8. If you were able to select a Python 3.6 interpreter, that is actually a bug! Could you please share more about your Python 3.6 environment? How was it installed (homebrew, conda, etc), and was it a virtual environment?
We could also include the minimum IPyKernel version in the prompt to install/upgrade it.
Of course, I am very willing to report to you the specific situation during the use process.
First of all, it's very strange that yesterday I could still automatically find and select the Python 3.6.2 interpreter installed in a conda environment through the button in the top right corner of Positron. However, when I tried to reproduce this issue today, Python 3.6.2 no longer appears in the options for automatic search.
Although I can currently find it by setting the Python 3.6.2 as the default interpreter in settings, due to the lack of a suitable IPyKernel, Python will fail to start, which means it cannot be used. This is strange because I am sure that yesterday I did run a program in an ipynb file using this Python 3.6.2 , as I only configured Keras in this version of Python.
But no matter what, this problem seems like it shouldn't have occurred, but now it's gone, hopefully we can encounter it again in the future.
Glad it's sorted for now. Is it possible that you had set Python 3.6.2 as the default interpreter in settings the first time too, and that caused it to show in the select interpreter menu?
Let's double check that:
- less than Python 3.8 is not usable
- we check the version of ipykernel and give good feedback to the user for too-old versions
On the first point, I installed Python 3.6.15 using pyenv and Positron did show it as an interpreter and tried to offer to install ipykernel. It eventually fails:
Python 3.6.15 (Pyenv) exited unexpectedly with error: SyntaxError: future feature annotations is not defined.
The minimum supported version is 3.8, so it should not be presented in the interpreter list.
On the second point of errors not explaining what version of ipykernel is needed... while we do try to install a later ipykernel if the version is <= 6.19.1, it seems that if another valid Python interpreter is currently running, and you try to switch to an interpreter with a missing or invalid (too early, < 6.19.1) version of ipykernel, it fails and leaves an error on the console, e.g.
Could not start runtime: failed to install ipykernel for Python 3.10.8 64-bit ('3.10.8').
It should attempt to stop the old interpreter, successfully install ipykernel when prompted, and start the new interpreter.
I just tried to reproduce the failure cases mentioned:
... it seems that if another valid Python interpreter is currently running, and you try to switch to an interpreter with a missing or invalid (too early, < 6.19.1) version of ipykernel, it fails and leaves an error on the console, ... It should attempt to stop the old interpreter, successfully install ipykernel when prompted, and start the new interpreter. and the interpreter now acts as expected, upgrading ipykernel if needed before starting the console
No longer occurs. If an incorrect ipykernel is installed, users are prompted to upgrade and the console launches as expected.
The minimum supported version is 3.8, so it should not be presented in the interpreter list.
Is still happening, and needs to be fixed.
Going to rename this issue so the goals are more clear here!
Unfortunately, I am seeing
Oh no! 😞
Here is code that should be filtering out <3.8 in the Positron interpreter dropdown. It does seem to be filtering if you step through this code/look at logs, so it must be repopulating somewhere else.
Unsupported versions are successfully filtered in the Python: Select Interpreter workflow
@isabelizimm We also register runtimes when certain interpreter-related events fire. We might not be filtering there.
@isabelizimm We also register runtimes when certain interpreter-related events fire. We might not be filtering there.
ah yes I encountered this when working on the includes/excludes here:
https://github.com/posit-dev/positron/blob/1c0e6ca15650e212ee1c99100c1f508c60fcd625/extensions/positron-python/src/client/positron/manager.ts#L112-L127
Verified Fixed
Positron Version(s) : 2025.03.0-116 & 2025.04.0-20
OS Version : OSX
Test scenario(s)
Did not see unsupported python in interpreter dropdown or command quick pick
Link(s) to TestRail test cases run or created: