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
Improve default interpreter path suggestion in quickpick UI #16971
Move "star" icon next to the suggested interpreter in quickpick list instead of showing it as a new entry
Show default Interpreter path suggestion only if user has set python.defaultInterpreterPath entry
In the above case show default Interpreter path entry at the top of the list instead, but below "Enter interpreter path" suggestion. Make it the active entry.
1. Make sure you have "python.experiments.optInto": ["All"], in your user settings. If not, add it and reload.
2. Create 2 workspaces with Python files in it, and create a virtual environment in one of them (python -m venv .venv). Let's name them with and without
#### 1. python .defaultInterpreterPath not set, no virtual environment
1. Make sure that the python.defaultIntepreterPath entries in your user and workspace settings are at their default value python
2. Open the without workspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left:
3. Make sure that the interpreter that is currently highlighted in the quickpick is the same as the one that is currently selected (same path being shown in Current: ....), that the entry label starts with star ⭐️ , and that its description says "Recommended"
4. Make sure that there is no "Use Python from python.defaultInterpreterPath setting" entry
#### 2. python.defaultInterpreterPath set, no virtual environment
1. Set one of the python.defaultIntepreterPath entries in your user and workspace settings to a valid Python interpreter path that is not python (for example /usr/local/bin/python3)
2. Open the without workspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left
2. Make sure that the interpreter currently selected has the same path as what's in python.defaultInterpreterPath
2. Make sure there is a "Use Python from python.defaultInterpreterPath setting" entry with the same path, that this entry is highlighted, and that it's the second on the list starting from the top (right below "Enter interpreter path...")
#### 3. python.defaultInterpreterPath not set, with virtual environment
1. Make sure the python.defaultIntepreterPath entry in your user and workspace settings are at their default value python
2. Open the with workspace, wait for the extension to load
3. Make sure that the interpreter in the status bar on the bottom left is the .venv virtual environment you created above, and then click it
3. Make sure that the interpreter that is currently highlighted in the quickpick is the .venv one, that the entry should be the second one from the top, that its label starts with a star ⭐️, and that its description says "Recommended"
3. Make sure that there are no duplicate entries with the same interpreter path
4. Make sure that there is no "Use Python from python.defaultInterpreterPath setting" entry
#### 4. python.defaultInterpreterPath set, with virtual environment
1. Set one of the python.defaultIntepreterPath entries in your user and workspace settings to a valid Python interpreter path that is not python (for example /usr/local/bin/python3)
2. Open the with workspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left
2. Make sure that the interpreter currently selected has the same path as what's in python.defaultInterpreterPath
2. Make sure there is a "Use Python from python.defaultInterpreterPath setting" entry with the same path, that this entry is highlighted, and that it's the second on the list starting from the top (right below "Enter interpreter path...")
3. Make sure that the third entry is the .venv environment, that its label starts with a star ⭐️, and that its description says "Recommended"
Kim-Adeline Miguel (@kimadeline) This looks like it has enough steps to be a test plan item on its own. I had to turn one of mine to test-plan item as well.
Activity
kimadeline commentedon Aug 20, 2021
### Verification steps:1. Make sure you have"python.experiments.optInto": ["All"],in your user settings. If not, add it and reload.2. Create 2 workspaces with Python files in it, and create a virtual environment in one of them (
python -m venv .venv). Let's name themwithandwithout#### 1.python .defaultInterpreterPathnot set, no virtual environment1. Make sure that the

python.defaultIntepreterPathentries in your user and workspace settings are at their default valuepython2. Open the
withoutworkspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left:3. Make sure that the interpreter that is currently highlighted in the quickpick is the same as the one that is currently selected (same path being shown in
Current: ....), that the entry label starts with star ⭐️ , and that its description says "Recommended"4. Make sure that there is no "Use Python from
python.defaultInterpreterPathsetting" entry#### 2.python.defaultInterpreterPathset, no virtual environment1. Set one of thepython.defaultIntepreterPathentries in your user and workspace settings to a valid Python interpreter path that is notpython(for example/usr/local/bin/python3)2. Open the
withoutworkspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left2. Make sure that the interpreter currently selected has the same path as what's in
python.defaultInterpreterPath2. Make sure there is a "Use Python from
python.defaultInterpreterPathsetting" entry with the same path, that this entry is highlighted, and that it's the second on the list starting from the top (right below "Enter interpreter path...")#### 3.python.defaultInterpreterPathnot set, with virtual environment1. Make sure thepython.defaultIntepreterPathentry in your user and workspace settings are at their default valuepython2. Open the
withworkspace, wait for the extension to load3. Make sure that the interpreter in the status bar on the bottom left is the
.venvvirtual environment you created above, and then click it3. Make sure that the interpreter that is currently highlighted in the quickpick is the
.venvone, that the entry should be the second one from the top, that its label starts with a star ⭐️, and that its description says "Recommended"3. Make sure that there are no duplicate entries with the same interpreter path
4. Make sure that there is no "Use Python from
python.defaultInterpreterPathsetting" entry#### 4.python.defaultInterpreterPathset, with virtual environment1. Set one of thepython.defaultIntepreterPathentries in your user and workspace settings to a valid Python interpreter path that is notpython(for example/usr/local/bin/python3)2. Open the
withworkspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left2. Make sure that the interpreter currently selected has the same path as what's in
python.defaultInterpreterPath2. Make sure there is a "Use Python from
python.defaultInterpreterPathsetting" entry with the same path, that this entry is highlighted, and that it's the second on the list starting from the top (right below "Enter interpreter path...")3. Make sure that the third entry is the
.venvenvironment, that its label starts with a star ⭐️, and that its description says "Recommended"karthiknadig commentedon Aug 20, 2021
Kim-Adeline Miguel (@kimadeline) This looks like it has enough steps to be a test plan item on its own. I had to turn one of mine to test-plan item as well.
kimadeline commentedon Aug 20, 2021
Sounds good, I'll move it to a test plan. Thanks!