-
Notifications
You must be signed in to change notification settings - Fork 304
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
FindMatchingInterpreter matching on interpreter path #5650
Comments
We need to rethink how we uniquely identify PythonEnvironments. |
We should add telemetry to see how many users fall into this category. Not necessary for June though. |
Repro for this. Create a conda env. Then you can create named conda kernelspec like this: These will all get startUsingPythonInterpreter kernelConnectionMetadata and they will all have the same path. Find preferredKernel in helpers.ts matches only on path in a couple of places. If using old webview you run with "Dupe Env Uno" and save the file. The next time you open it you might get your kernel switched to the main conda env (dupe1) or "Dupe Env Dos" it's all ordering dependent. The interactive window part usually works since the current interpreter is first in the list, so it usually gets matched before the other ones, but that is ordering dependent to some degree as well. |
FindMatchingInterpreter isn't used much anymore, but going to try and repro to see what the behavior is like. |
These are just completely skipped now. Seems wrong to me? Kernelspec might have a custom env. |
This works fine if the custom kernelspecs are any different than the default kernelspec. |
Noticed this in a semi-related PR here.
#5644 (review)
In FindMatchingInterpreter it's matching based on the path of the interpreter. I believe this might be an issue as "Interpreters" here is actually PythonEnvironments, and for Conda I believe you can have multiple environments with the same interpreter path if you don't specify the python version when creating the env.
The text was updated successfully, but these errors were encountered: