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
notification was needed to select the right env #19897
Knowing I had installed python3, and had aliased it to python, I found the path of python3 and inserted it into the input box. The logs show that it succeeded after that.
Set python.logging.level to debug in User settings
Run Python: Clear cache and reload
Run Python: Select Interpreter command and wait for discovery to complete before capturing the logs.
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
Log should contain details of the discovered interpreters, I expect it to contain /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 as well.
. We're not checking whether a refresh is going on at the moment and automatically select the interpreter. We need to either wait for refresh to complete or always show the dropdown.
Checking whether a refresh is going on should be easy as well, simply check if this.discoveryApi.getRefreshPromise() is defined along with the interpreters.length === 1 check.
I think I was over simplifying, I think we need to let the UI show. For the reason, that if the user only has python 2.7, then this is the only way they know. Also, the experience with showing discovery progress and selection is better with the select interpreter UI.
Activity
[-]notification was needed to slect the right env[/-][+]notification was needed to select the right env[/+]karthiknadig commentedon Sep 27, 2022
Looks like the issue is that discovery did not find all the global installs when running through create env steps.
karrtikr commentedon Sep 27, 2022
Megan Rogge (@meganrogge) Can you please provide the logs as well?
python.logging.leveltodebugin User settingsPython: Clear cache and reloadPython: Select Interpretercommand and wait for discovery to complete before capturing the logs.Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)Log should contain details of the discovered interpreters, I expect it to contain
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3as well.meganrogge commentedon Sep 27, 2022
Yep, here they are
And yes, it did show up in the select interpreter dropdown this time
karrtikr commentedon Sep 27, 2022
Thanks. I assume you mean the dropdown opened by
Python: Select Interpreter.Karthik Nadig (@karthiknadig) It seems to me that the bug is here:
vscode-python/src/client/pythonEnvironments/creation/provider/venvCreationProvider.ts
Line 133 in e23240e
karthiknadig commentedon Sep 27, 2022
Kartik Raj (@karrtikr) I will go with always showing the interpreter selection for now.
karrtikr commentedon Sep 27, 2022
Checking whether a refresh is going on should be easy as well, simply check if
this.discoveryApi.getRefreshPromise()is defined along with theinterpreters.length === 1check.karthiknadig commentedon Sep 27, 2022
I think I was over simplifying, I think we need to let the UI show. For the reason, that if the user only has python 2.7, then this is the only way they know. Also, the experience with showing discovery progress and selection is better with the select interpreter UI.
karrtikr commentedon Oct 3, 2022
Verified via code review: https://github.com/microsoft/vscode-python/pull/19925/files#diff-8a7b14764c3bbc1df9d5058250a7559bc5472d21e202667f207b36e3ec6feac0
Fix bugs found during TPI (#19925)
Fix bugs found during TPI (microsoft#19925)
Fix bugs found during TPI (microsoft/vscode-python#19925)