-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ensure default global interpreter used is the default python
in terminal
#19818
Comments
python
in terminalpython
in terminal
@karrtikr This should use an internal symlink that is always on PATH. That symlink should point to the selected python in a given workspace. That way python in terminal will always be python that is selected in the extension. This is easier said than done. |
Which is why I think for now we should simply select the default python in terminal instead of selecting the highest version. |
I am not sure it helps. I think it will confuse even more, because outside of VS Code when users type If, we go by the above plan, there are no clear rules. In, activated scenario the VS Code terminal is the selected python. But in global scenario it is not. And the global scenario, does not reflect what would happen in a terminal outside of VS Code. It is harder to define what happens. |
I understand that's the ideal solution, but I'm just talking about improving the default experience.
By default it will be, unless user explicitly changes the global interpreter. It's better than what we currently have now, where we select the highest version. |
maybe related? #13327 |
@luabud Yep, #13327 would be nice (and can be done btw with the terminal exp), but I think we should still change the auto-selection order to select default python configured in the system. For eg. most codespaces, or dev containers are configured to use Python on |
python
in terminalpython
in terminal
python
in terminalpython
in terminal
Codespaces and dev containers are not the typical user setup. The |
FWIW extension can be configured to use the "python.defaultInterpreterPath": "py" and then syncing settings across all devices. Only a one time customisation is required. |
Currently in case of global interpreters, the interpreter with the highest version is preferred:
We should instead prefer the interpreter/environment which appears first in
PATH
, new selection order can be:python
inPATH
:python -c"import sys;print(sys.executable)"
Publish the auto-selection order in our docs.
cc/ @karthiknadig
The text was updated successfully, but these errors were encountered: