posit-dev / positron

Positron, a next-generation data science IDE
Other
2.48k stars 77 forks source link

Lack of user feedback when no (suitable) interpreters installed #3468

Open sharon-wang opened 3 months ago

sharon-wang commented 3 months ago

Positron Version: 2024.06.0-40

Positron Version: 2024.06.0 (system setup) build 2024.06.0-40 Code - OSS Version: 1.89.0 Commit: 59891fe84a2198e83d5a3ddacabdd087d66178a4 Date: 2024-06-10T03:23:17.109Z Electron: 28.2.8 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Windows_NT x64 10.0.20348

Steps to reproduce the issue:

  1. Do not have any python or R installations
  2. Open Positron
  3. See that no interpreters are shown and no guidance to install a interpreter in Console or Interpreter Picker

https://github.com/posit-dev/positron/assets/25834218/e86926f3-545e-4948-948f-ff0662eeee69

https://github.com/posit-dev/positron/assets/25834218/48d9a88a-389e-4f48-ba26-65ac2a4a6b3d

What did you expect to happen?

There is some user feedback in the R extension output if R installations are detected but do not fulfill the minimum version, but we should surface this feedback in the interpreter dropdown and quick pick too.

https://github.com/posit-dev/positron/assets/25834218/55d7a406-1a6e-4f68-9b87-51c4711e28ed

Were there any error messages in the output or Developer Tools console?

I've included output for informational purposes, but this is mainly a UI/UX enhancement rather than something going wrong in detecting interpreters. There are some odd errors from the R extension though..

Output - Python

Details ``` 2024-06-10 14:40:31.320 [info] Telemetry level is off 2024-06-10 14:40:31.321 [info] Experiments are disabled, only manually opted experiments are active. 2024-06-10 14:40:31.321 [debug] Start watching file for changes C:\Users\administrator\.conda\environments.txt 2024-06-10 14:40:31.321 [debug] Start watching: C:\Users\administrator\.conda with pattern environments.txt using VSCode API 2024-06-10 14:40:31.321 [debug] Searching windows known paths locator 2024-06-10 14:40:31.321 [debug] Searching for pyenv environments 2024-06-10 14:40:31.321 [debug] Searching for conda. 2024-06-10 14:40:31.321 [debug] Searching for windows store envs 2024-06-10 14:40:31.321 [info] activatePositron: done! 2024-06-10 14:40:31.321 [debug] Probing conda binary: conda 2024-06-10 14:40:31.322 [info] pythonRuntimeDiscoverer: Starting Python runtime discoverer 2024-06-10 14:40:31.322 [debug] Finished searching for windows store envs 2024-06-10 14:40:31.322 [debug] Finished searching for custom virtual envs 2024-06-10 14:40:31.322 [debug] Finished searching windows known paths locator 2024-06-10 14:40:31.322 [debug] Couldn't locate the state binary. 2024-06-10 14:40:31.322 [debug] Dump environment variables { "ALLUSERSPROFILE": "C:\\ProgramData", "APPDATA": "C:\\Users\\administrator\\AppData\\Roaming", "AWS_EXECUTION_ENV": "EC2", "CLIENTNAME": "shmbp", "COMPUTERNAME": "EC2AMAZ-FGEIMAL", "EC2LAUNCH_TELEMETRY": "1", "ELECTRON_RUN_AS_NODE": "1", "FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer", "FPS_BROWSER_USER_PROFILE_STRING": "Default", "HOMEDRIVE": "C:", "HOMEPATH": "\\Users\\administrator", "LOCALAPPDATA": "C:\\Users\\administrator\\AppData\\Local", "LOGONSERVER": "\\\\EC2AMAZ-FGEIMAL", "NUMBER_OF_PROCESSORS": "2", "ORIGINAL_XDG_CURRENT_DESKTOP": "undefined", "OS": "Windows_NT", "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "PROCESSOR_ARCHITECTURE": "AMD64", "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 85 Stepping 7, GenuineIntel", "PROCESSOR_LEVEL": "6", "PROCESSOR_REVISION": "5507", "PUBLIC": "C:\\Users\\Public", "SESSIONNAME": "RDP-Tcp#0", "TEMP": "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2", "TMP": "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2", "USERDOMAIN": "EC2AMAZ-FGEIMAL", "USERDOMAIN_ROAMINGPROFILE": "EC2AMAZ-FGEIMAL", "USERNAME": "Administrator", "USERPROFILE": "C:\\Users\\administrator", "VSCODE_AMD_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess", "VSCODE_CODE_CACHE_PATH": "C:\\Users\\administrator\\AppData\\Roaming\\Positron\\CachedData\\59891fe84a2198e83d5a3ddacabdd087d66178a4", "VSCODE_CRASH_REPORTER_PROCESS_TYPE": "extensionHost", "VSCODE_CWD": "C:\\Program Files\\Positron", "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true", "VSCODE_IPC_HOOK": "\\\\.\\pipe\\2e051cd9-1.89.0-main-sock", "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"osLocale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}", "VSCODE_PID": "5080", "__COMPAT_LAYER": "DetectorsAppHealth", "ChocolateyInstall": "C:\\ProgramData\\chocolatey", "ChocolateyLastPathUpdate": "133574041467869297", "ComSpec": "C:\\Windows\\system32\\cmd.exe", "CommonProgramFiles": "C:\\Program Files\\Common Files", "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files", "CommonProgramW6432": "C:\\Program Files\\Common Files", "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData", "PSModulePath": "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules", "ProgramData": "C:\\ProgramData", "ProgramFiles": "C:\\Program Files", "ProgramFiles(x86)": "C:\\Program Files (x86)", "ProgramW6432": "C:\\Program Files", "SystemDrive": "C:", "SystemRoot": "C:\\Windows", "windir": "C:\\Windows", "Path": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Amazon\\cfn-bootstrap\\;C:\\ProgramData\\chocolatey\\bin;C:\\Users\\administrator\\AppData\\Local\\Microsoft\\WindowsApps;", "PYTHONPYCACHEPREFIX": "c:\\Users\\administrator\\AppData\\Roaming\\Positron\\User\\globalStorage\\ms-python.python\\pycache" } 2024-06-10 14:40:31.322 [info] > conda info --json 2024-06-10 14:40:31.322 [debug] Failed to spawn conda binary conda [Error: spawn conda ENOENT at ChildProcess._handle.onexit (node:internal/child_process:284:19) at onErrorNT (node:internal/child_process:477:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)] { errno: -4058, code: 'ENOENT', syscall: 'spawn conda', path: 'conda', spawnargs: [ 'info', '--json' ] } 2024-06-10 14:40:31.322 [debug] Finished searching for global virtual envs 2024-06-10 14:40:33.820 [debug] Finished searching for windows registry interpreters 2024-06-10 14:40:33.822 [debug] Couldn't locate the conda binary. 2024-06-10 14:40:33.822 [debug] Couldn't locate the conda binary. 2024-06-10 14:40:33.823 [debug] Finished with environment resolver 2024-06-10 14:40:33.823 [debug] Finished with environment reducer 2024-06-10 14:40:33.823 [debug] Environments added to cache [] 2024-06-10 14:40:33.858 [info] > python -c "import sys;print(sys.executable)" 2024-06-10 14:40:34.028 [error] [Error: Command failed: python -c "import sys;print(sys.executable)" 'python' is not recognized as an internal or external command, operable program or batch file. at ChildProcess.exithandler (node:child_process:422:12) at ChildProcess.emit (node:events:529:35) at maybeClose (node:internal/child_process:1098:16) at ChildProcess._handle.onexit (node:internal/child_process:303:5)] { code: 1, killed: false, signal: null, cmd: 'python -c "import sys;print(sys.executable)"' } 2024-06-10 14:40:34.030 [info] pythonRuntimeDiscoverer: recommended interpreter: undefined 2024-06-10 14:40:34.030 [info] pythonRuntimeDiscoverer: sorting interpreters 2024-06-10 14:40:34.030 [info] pythonRuntimeDiscoverer: discovered 0 Python interpreters 2024-06-10 14:40:34.031 [info] Editor support is inactive since language server is set to None. 2024-06-10 14:40:34.039 [info] pythonRuntimeDiscoverer: recommended for workspace: false 2024-06-10 14:40:34.062 [info] > python -c "import sys;print(sys.executable)" 2024-06-10 14:40:34.063 [debug] Activation Commands received undefined for shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe, resource undefined and interpreter undefined 2024-06-10 14:40:34.063 [debug] Activated environment variables for undefined undefined 2024-06-10 14:40:34.084 [debug] Activation Commands received undefined for shell cmd, resource undefined and interpreter undefined 2024-06-10 14:40:34.085 [debug] Activated environment variables for undefined undefined 2024-06-10 14:40:36.761 [debug] Terminal shell path 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' identified as shell 'powershell' 2024-06-10 14:40:36.761 [debug] Shell identified as powershell 2024-06-10 14:40:43.412 [debug] Received shell integration sequence for powershell 2024-06-10 14:40:43.412 [info] Shell integration status changed, can confirm it's working. 2024-06-10 14:40:43.507 [debug] Activation Commands received undefined for shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe, resource undefined and interpreter undefined 2024-06-10 14:40:43.508 [debug] Activated environment variables for undefined undefined 2024-06-10 14:40:43.511 [debug] Activation Commands received undefined for shell cmd, resource undefined and interpreter undefined 2024-06-10 14:40:43.511 [debug] Activated environment variables for undefined undefined 2024-06-10 14:44:43.307 [info] Telemetry level is off 2024-06-10 14:44:43.307 [info] Experiments are disabled, only manually opted experiments are active. 2024-06-10 14:44:43.307 [debug] Start watching file for changes C:\Users\administrator\.conda\environments.txt 2024-06-10 14:44:43.307 [debug] Start watching: C:\Users\administrator\.conda with pattern environments.txt using VSCode API 2024-06-10 14:44:43.307 [debug] Searching windows known paths locator 2024-06-10 14:44:43.307 [debug] Searching for pyenv environments 2024-06-10 14:44:43.307 [debug] Searching for conda. 2024-06-10 14:44:43.307 [debug] Searching for windows store envs 2024-06-10 14:44:43.307 [info] activatePositron: done! 2024-06-10 14:44:43.307 [debug] Probing conda binary: conda 2024-06-10 14:44:43.307 [debug] Finished searching windows known paths locator 2024-06-10 14:44:43.307 [debug] Finished searching for custom virtual envs 2024-06-10 14:44:43.307 [debug] Finished searching for windows store envs 2024-06-10 14:44:43.307 [debug] Couldn't locate the state binary. 2024-06-10 14:44:43.307 [debug] Dump environment variables { "ALLUSERSPROFILE": "C:\\ProgramData", "APPDATA": "C:\\Users\\administrator\\AppData\\Roaming", "AWS_EXECUTION_ENV": "EC2", "CLIENTNAME": "shmbp", "COMPUTERNAME": "EC2AMAZ-FGEIMAL", "EC2LAUNCH_TELEMETRY": "1", "ELECTRON_RUN_AS_NODE": "1", "FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer", "FPS_BROWSER_USER_PROFILE_STRING": "Default", "HOMEDRIVE": "C:", "HOMEPATH": "\\Users\\administrator", "LOCALAPPDATA": "C:\\Users\\administrator\\AppData\\Local", "LOGONSERVER": "\\\\EC2AMAZ-FGEIMAL", "NUMBER_OF_PROCESSORS": "2", "ORIGINAL_XDG_CURRENT_DESKTOP": "undefined", "OS": "Windows_NT", "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "PROCESSOR_ARCHITECTURE": "AMD64", "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 85 Stepping 7, GenuineIntel", "PROCESSOR_LEVEL": "6", "PROCESSOR_REVISION": "5507", "PUBLIC": "C:\\Users\\Public", "SESSIONNAME": "RDP-Tcp#0", "TEMP": "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2", "TMP": "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2", "USERDOMAIN": "EC2AMAZ-FGEIMAL", "USERDOMAIN_ROAMINGPROFILE": "EC2AMAZ-FGEIMAL", "USERNAME": "Administrator", "USERPROFILE": "C:\\Users\\administrator", "VSCODE_AMD_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess", "VSCODE_CODE_CACHE_PATH": "C:\\Users\\administrator\\AppData\\Roaming\\Positron\\CachedData\\59891fe84a2198e83d5a3ddacabdd087d66178a4", "VSCODE_CRASH_REPORTER_PROCESS_TYPE": "extensionHost", "VSCODE_CWD": "C:\\Program Files\\Positron", "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true", "VSCODE_IPC_HOOK": "\\\\.\\pipe\\2e051cd9-1.89.0-main-sock", "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"osLocale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}", "VSCODE_PID": "5080", "__COMPAT_LAYER": "DetectorsAppHealth", "ChocolateyInstall": "C:\\ProgramData\\chocolatey", "ChocolateyLastPathUpdate": "133574041467869297", "ComSpec": "C:\\Windows\\system32\\cmd.exe", "CommonProgramFiles": "C:\\Program Files\\Common Files", "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files", "CommonProgramW6432": "C:\\Program Files\\Common Files", "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData", "PSModulePath": "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules", "ProgramData": "C:\\ProgramData", "ProgramFiles": "C:\\Program Files", "ProgramFiles(x86)": "C:\\Program Files (x86)", "ProgramW6432": "C:\\Program Files", "SystemDrive": "C:", "SystemRoot": "C:\\Windows", "windir": "C:\\Windows", "Path": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Amazon\\cfn-bootstrap\\;C:\\ProgramData\\chocolatey\\bin;C:\\Users\\administrator\\AppData\\Local\\Microsoft\\WindowsApps;", "PYTHONPYCACHEPREFIX": "c:\\Users\\administrator\\AppData\\Roaming\\Positron\\User\\globalStorage\\ms-python.python\\pycache" } 2024-06-10 14:44:43.307 [info] > conda info --json 2024-06-10 14:44:43.307 [debug] Failed to spawn conda binary conda [Error: spawn conda ENOENT at ChildProcess._handle.onexit (node:internal/child_process:284:19) at onErrorNT (node:internal/child_process:477:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)] { errno: -4058, code: 'ENOENT', syscall: 'spawn conda', path: 'conda', spawnargs: [ 'info', '--json' ] } 2024-06-10 14:44:43.308 [debug] Finished searching for global virtual envs 2024-06-10 14:44:43.375 [info] pythonRuntimeDiscoverer: Starting Python runtime discoverer 2024-06-10 14:44:44.555 [debug] Finished searching for windows registry interpreters 2024-06-10 14:44:44.557 [debug] Couldn't locate the conda binary. 2024-06-10 14:44:44.557 [debug] Couldn't locate the conda binary. 2024-06-10 14:44:44.557 [debug] Finished with environment resolver 2024-06-10 14:44:44.557 [debug] Finished with environment reducer 2024-06-10 14:44:44.557 [debug] Environments added to cache [] 2024-06-10 14:44:44.587 [info] > python -c "import sys;print(sys.executable)" 2024-06-10 14:44:44.840 [error] [Error: Command failed: python -c "import sys;print(sys.executable)" 'python' is not recognized as an internal or external command, operable program or batch file. at ChildProcess.exithandler (node:child_process:422:12) at ChildProcess.emit (node:events:529:35) at maybeClose (node:internal/child_process:1098:16) at ChildProcess._handle.onexit (node:internal/child_process:303:5)] { code: 1, killed: false, signal: null, cmd: 'python -c "import sys;print(sys.executable)"' } 2024-06-10 14:44:44.840 [info] pythonRuntimeDiscoverer: recommended interpreter: undefined 2024-06-10 14:44:44.841 [info] pythonRuntimeDiscoverer: sorting interpreters 2024-06-10 14:44:44.841 [info] pythonRuntimeDiscoverer: discovered 0 Python interpreters 2024-06-10 14:44:44.841 [info] Editor support is inactive since language server is set to None. 2024-06-10 14:44:44.845 [info] pythonRuntimeDiscoverer: recommended for workspace: false 2024-06-10 14:44:44.856 [info] > python -c "import sys;print(sys.executable)" 2024-06-10 14:44:44.856 [debug] Activation Commands received undefined for shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe, resource undefined and interpreter undefined 2024-06-10 14:44:44.857 [debug] Activated environment variables for undefined undefined 2024-06-10 14:44:44.861 [debug] Activation Commands received undefined for shell cmd, resource undefined and interpreter undefined 2024-06-10 14:44:44.861 [debug] Activated environment variables for undefined undefined 2024-06-10 14:44:45.881 [debug] Received shell integration sequence for powershell 2024-06-10 14:44:49.146 [debug] Terminal shell path 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' identified as shell 'powershell' 2024-06-10 14:44:49.146 [debug] Shell identified as powershell 2024-06-10 14:50:50.542 [debug] Searching windows known paths locator 2024-06-10 14:50:50.543 [debug] Searching for pyenv environments 2024-06-10 14:50:50.543 [debug] Finished searching for windows registry interpreters 2024-06-10 14:50:50.543 [debug] Searching for windows store envs 2024-06-10 14:50:50.543 [debug] Couldn't locate the conda binary. 2024-06-10 14:50:50.543 [debug] Couldn't locate the state binary. 2024-06-10 14:50:50.560 [debug] Finished searching for custom virtual envs 2024-06-10 14:50:50.561 [debug] Finished searching for windows store envs 2024-06-10 14:50:50.627 [debug] Finished searching windows known paths locator 2024-06-10 14:50:50.628 [debug] Finished searching for global virtual envs 2024-06-10 14:50:50.629 [debug] Finished with environment resolver 2024-06-10 14:50:50.629 [debug] Finished with environment reducer 2024-06-10 14:50:50.630 [debug] Environments added to cache [] ```

Output - R

Details ``` 2024-06-10 14:40:31.317 [info] Log level: Debug 2024-06-10 14:40:31.317 [info] Refreshing testthat status 2024-06-10 14:40:31.318 [info] Not working in an R package 2024-06-10 14:40:31.318 [info] Context key 'testthatIsConfigured' is 'false' 2024-06-10 14:40:31.318 [info] Context key 'testthatHasTests' is 'false' 2024-06-10 14:40:31.318 [info] Checking for 'InstallPath' in registry key \Software\R-Core\R64 for hive HKCU 2024-06-10 14:40:33.416 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1: ERROR: The system was unable to find the specified registry key or value. 2024-06-10 14:40:33.436 [info] Checking for 'InstallPath' in registry key \Software\WOW6432Node\R-Core\R64 for hive HKCU 2024-06-10 14:40:33.875 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1: ERROR: The system was unable to find the specified registry key or value. 2024-06-10 14:40:33.894 [info] Checking for 'InstallPath' in registry key \Software\R-Core\R64 for hive HKLM 2024-06-10 14:40:34.233 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1: ERROR: The system was unable to find the specified registry key or value. 2024-06-10 14:40:34.252 [info] Checking for 'InstallPath' in registry key \Software\WOW6432Node\R-Core\R64 for hive HKLM 2024-06-10 14:40:34.379 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1: ERROR: The system was unable to find the specified registry key or value. 2024-06-10 14:44:43.303 [info] Log level: Debug 2024-06-10 14:44:43.304 [info] Refreshing testthat status 2024-06-10 14:44:43.304 [info] Not working in an R package 2024-06-10 14:44:43.304 [info] Context key 'testthatIsConfigured' is 'false' 2024-06-10 14:44:43.304 [info] Context key 'testthatHasTests' is 'false' 2024-06-10 14:44:43.375 [info] Checking for 'InstallPath' in registry key \Software\R-Core\R64 for hive HKCU 2024-06-10 14:44:44.040 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1: ERROR: The system was unable to find the specified registry key or value. 2024-06-10 14:44:44.060 [info] Checking for 'InstallPath' in registry key \Software\WOW6432Node\R-Core\R64 for hive HKCU 2024-06-10 14:44:44.762 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1: ERROR: The system was unable to find the specified registry key or value. 2024-06-10 14:44:44.782 [info] Checking for 'InstallPath' in registry key \Software\R-Core\R64 for hive HKLM 2024-06-10 14:44:45.122 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1: ERROR: The system was unable to find the specified registry key or value. 2024-06-10 14:44:45.142 [info] Checking for 'InstallPath' in registry key \Software\WOW6432Node\R-Core\R64 for hive HKLM 2024-06-10 14:44:45.800 [info] Unable to get value of 'InstallPath': QUERY command exited with code 1: ERROR: The system was unable to find the specified registry key or value. ```

Developer Tools

No errors.

juliasilge commented 3 months ago

We can check whether there are any runtimes after the discovery phase of startup is complete, and maybe a first step here would be just to show a modal popup with info.