Repository navigation
No way to "Clear Workspace Interpreter Setting" #21850
Copy link
Copy link
Closed
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsdebtCode quality issuesCode quality issuesverifiedVerification succeededVerification succeeded
Milestone
Description
Type: Bug
Behaviour
Expected vs. Actual
I cannot reset the currently active workspace interpreter, even though this feature/command/setting is referred to on various issues (#18255, #17693, #17890, #17693, ...) and even in code:
Line 350 in 021b362
"command": "python.clearWorkspaceInterpreter", vscode-python/package.nls.json
Line 12 in 021b362
"python.command.python.clearWorkspaceInterpreter.title": "Clear Workspace Interpreter Setting", vscode-python/src/client/interpreter/configuration/interpreterSelector/commands/resetInterpreter.ts
Line 14 in 021b362
export class ResetInterpreterCommand extends BaseInterpreterSelectorCommand {
Steps to reproduce:
- open command palette
- search for "python interpreter"
- expected command not list
Diagnostic data
- Python version (& distribution if applicable, e.g. Anaconda): 3.11.4
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Poetry
- Value of the
python.languageServersetting: Default
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
User Settings
languageServer: "Pylance"
Extension version: 2023.14.0
VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (8 x 2592) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | undefined |
| Memory (System) | 15.84GB (5.28GB free) |
| Process Argv | --crash-reporter-id 6a947b0b-2920-480a-98a0-5c6d6b7ebd8c |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | WSL: Ubuntu |
| OS | Linux x64 5.15.90.1-microsoft-standard-WSL2 |
| CPUs | Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (8 x 2591) |
| Memory (System) | 7.76GB (6.60GB free) |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263cf:30792227
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
3biah626:30602489
f6dab269:30613381
vscrpc:30673769
showlangstatbar:30737416
03d35959:30757346
7ij38806:30736111
pythonfmttext:30731395
pythoncmv:30756943
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
gsofb:30804716
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv1:30812748
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsdebtCode quality issuesCode quality issuesverifiedVerification succeededVerification succeeded

Activity
djbrown commentedon Aug 19, 2023
Possible workaround might be via usernamehw.commands as mentioned in #17693 (comment)
Didn't look into that yet
karrtikr commentedon Aug 21, 2023
Hi Daniel Brown (@djbrown) , we currently only show it if a Python file is currently opened, as that is when the currently selected interpreter is visible in the status bar:

Thanks for letting us know about this, we should probably clarify it in the docs.
Show `Python: Clear Workspace interpreter` command regardless of whet…
karrtikr commentedon Aug 21, 2023
Fix should be out in the pre-release version of the extension in a day, use the following to try it out:
I've changed it to always show the command even when a Python file isn't opened.
djbrown commentedon Aug 24, 2023
ahh when I have a python file open as current file then the command shows
but switching to the pre-release version did not change the behaviour for me (command still only available if currentLanguae is python).
but then agein I'm confused by the different version numbers:
v2022.3.2030538168-devv2023.14.02023.15.12301911Kartik Raj (@karrtikr) how can I check if I have the proper correct beta version of the plugin installed?
djbrown commentedon Aug 24, 2023
reloading or even restarting the IDE didn't help
karrtikr commentedon Aug 24, 2023
Apologies, fix is actually only out in VS Code Insiders for now, can you try it out?
It should be out in the next official release of VS Code stable, which is around the 6th next month.
djbrown commentedon Aug 25, 2023
👍🏾 works on vscode-insiders extension prerelease version
v2023.15.12361009Show `Python: Clear Workspace interpreter` command regardless of whet…
Merged PR posit-dev/positron-python#213: Merge python extension relea…
Merged PR posit-dev/positron-python#213: Merge python extension relea…