Repository navigation
Stuck on Discovering Python Interpreters #20250
Copy link
Copy link
Closed as not planned
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsdebtCode quality issuesCode quality issuesinfo-neededIssue requires more information from posterIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
Type: Bug
Behaviour
Expected vs. Actual
Discovering Python Interpreters should vanish after few seconds, but it keeps running.
Diagnostic data
- Python version (& distribution if applicable, e.g. Anaconda): 3.11.0
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
- Value of the
python.languageServersetting: Pylance
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Telemetry is disabled
Experiments are disabled, only manually opted experiments are active.
LSP Notebooks experiment is enabled
LSP Notebooks interactive window support is enabled
[INFO 2022-10-19 14:43:22.219]: [
'Display locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined'
]
[INFO 2022-10-19 14:43:22.233]: [
'Display locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined'
]
> conda info --json
[INFO 2022-10-19 14:43:22.242]: Environments added to cache [{"name":"base","location":"/Users/kumarsambhav/miniforge3","kind":"virt-conda","executable":{"filename":"/Users/kumarsambhav/miniforge3/bin/python","sysPrefix":"/Users/kumarsambhav/miniforge3","ctime":1667009301356,"mtime":1667009301356},"display":"Python 3.9.13 ('base')","version":{"major":3,"minor":9,"micro":13,"release":{"level":"final","serial":0},"sysVersion":"3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:01:00) \n[Clang 13.0.1 ]"},"arch":3,"distro":{"org":"Anaconda, Inc."},"source":[],"type":"Conda","id":"/Users/kumarsambhav/miniforge3/bin/python","detailedDisplayName":"Python 3.9.13 ('base': conda)"}]
[INFO 2022-10-19 14:43:22.244]: Found: /usr/bin/python3 --> /usr/bin/python3
> ~/.pyenv/versions/3.11.0/bin/python ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/interpreterInfo.py
> /opt/homebrew/bin/python3.11 ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/interpreterInfo.py
[INFO 2022-10-19 14:43:22.294]: Found interpreter for /Users/kumarsambhav/.pyenv/versions/3.11.0/bin/python,/Users/kumarsambhav/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py,/Users/kumarsambhav/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/interpreterInfo.py
[INFO 2022-10-19 14:43:22.320]: Found interpreter for /opt/homebrew/bin/python3.11,/Users/kumarsambhav/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py,/Users/kumarsambhav/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/interpreterInfo.py
Python interpreter path: /opt/homebrew/bin/python3.11
[INFO 2022-10-19 14:43:22.756]: [
'getActivatedEnvironmentVariables, Class name = O, completed in 432ms, has a falsy return value, Arg 1: undefined, Arg 2: {"id":"/opt/homebrew/bin/python3.11","sysPrefix":"/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.11","envType":"Global","envName":"","architecture":3,"sysVersion":"3.11.0 (main, Nov 12 2022, 12:35:43) [Clang 14.0.0 (clang-1400.0.29.202)]","version":{"raw":"3.11.0","major":3,"minor":11,"patch":0,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.11.0 64-bit","detailedDisplayName":"Python 3.11.0 64-bit","path":"/opt/homebrew/bin/python3.11"}, Arg 3: false'
]
> conda run -n base --no-capture-output python ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/printEnvVariables.py
> conda run -n base --no-capture-output python ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/printEnvVariables.py
> ~/miniforge3/bin/python ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/interpreterInfo.py
> ~/miniforge3/envs/TENSOR_MAC/bin/python ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/interpreterInfo.py
[INFO 2022-10-19 14:43:23.85]: Found interpreter for /Users/kumarsambhav/miniforge3/bin/python,/Users/kumarsambhav/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py,/Users/kumarsambhav/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/interpreterInfo.py
> ~/miniforge3/envs/tensorflow/bin/python ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/interpreterInfo.py
[INFO 2022-10-19 14:43:23.138]: Found interpreter for /Users/kumarsambhav/miniforge3/envs/TENSOR_MAC/bin/python,/Users/kumarsambhav/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py,/Users/kumarsambhav/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/interpreterInfo.py
[INFO 2022-10-19 14:43:23.152]: Found interpreter for /Users/kumarsambhav/miniforge3/envs/tensorflow/bin/python,/Users/kumarsambhav/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py,/Users/kumarsambhav/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/interpreterInfo.py
> conda run -n base --no-capture-output python ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/printEnvVariables.py
> conda run -n base --no-capture-output python ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/printEnvVariables.py
> conda run -n base --no-capture-output python ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.2/pythonFiles/printEnvVariables.py
[INFO 2022-10-19 14:43:24.582]: [
'parseEnvironmentOutput, Class name = O, completed in 0ms, has a truthy return value'
]
[INFO 2022-10-19 14:43:24.582]: [
`getActivatedEnvironmentVariables, Class name = O, completed in 2346ms, has a truthy return value, Arg 1: undefined, Arg 2: {"id":"/Users/kumarsambhav/miniforge3/bin/python","sysPrefix":"/Users/kumarsambhav/miniforge3","envType":"Conda","envName":"base","envPath":"/Users/kumarsambhav/miniforge3","architecture":3,"sysVersion":"3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:01:00) \\n[Clang 13.0.1 ]","version":{"raw":"3.9.13","major":3,"minor":9,"patch":13,"build":[],"prerelease":["final","0"]},"companyDisplayName":"Anaconda, Inc.","displayName":"Python 3.9.13 ('base')","detailedDisplayName":"Python 3.9.13 ('base': conda)","path":"/Users/kumarsambhav/miniforge3/bin/python"}, Arg 3: false`
]
[INFO 2022-10-19 14:43:24.583]: [
'parseEnvironmentOutput, Class name = O, completed in 0ms, has a truthy return value'
]
[INFO 2022-10-19 14:43:24.584]: [
`getActivatedEnvironmentVariables, Class name = O, completed in 2348ms, has a truthy return value, Arg 1: undefined, Arg 2: {"id":"/Users/kumarsambhav/miniforge3/bin/python","sysPrefix":"/Users/kumarsambhav/miniforge3","envType":"Conda","envName":"base","envPath":"/Users/kumarsambhav/miniforge3","architecture":3,"sysVersion":"3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:01:00) \\n[Clang 13.0.1 ]","version":{"raw":"3.9.13","major":3,"minor":9,"patch":13,"build":[],"prerelease":["final","0"]},"companyDisplayName":"Anaconda, Inc.","displayName":"Python 3.9.13 ('base')","detailedDisplayName":"Python 3.9.13 ('base': conda)","path":"/Users/kumarsambhav/miniforge3/bin/python"}, Arg 3: false`
]
[INFO 2022-10-19 14:43:24.631]: [
'parseEnvironmentOutput, Class name = O, completed in 0ms, has a truthy return value'
]
[INFO 2022-10-19 14:43:24.631]: [
`getActivatedEnvironmentVariables, Class name = O, completed in 1405ms, has a truthy return value, Arg 1: undefined, Arg 2: {"id":"/Users/kumarsambhav/miniforge3/bin/python","sysPrefix":"/Users/kumarsambhav/miniforge3","envType":"Conda","envName":"base","envPath":"/Users/kumarsambhav/miniforge3","architecture":3,"sysVersion":"3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:01:00) \\n[Clang 13.0.1 ]","version":{"raw":"3.9.13","major":3,"minor":9,"patch":13,"build":[],"prerelease":["final","0"]},"companyDisplayName":"Anaconda, Inc.","displayName":"Python 3.9.13 ('base')","detailedDisplayName":"Python 3.9.13 ('base': conda)","path":"/Users/kumarsambhav/miniforge3/bin/python"}, Arg 3: false`
]
[INFO 2022-10-19 14:43:24.946]: [
'parseEnvironmentOutput, Class name = O, completed in 0ms, has a truthy return value'
]
[INFO 2022-10-19 14:43:24.947]: [
`getActivatedEnvironmentVariables, Class name = O, completed in 1455ms, has a truthy return value, Arg 1: undefined, Arg 2: {"id":"/Users/kumarsambhav/miniforge3/bin/python","sysPrefix":"/Users/kumarsambhav/miniforge3","envType":"Conda","envName":"base","envPath":"/Users/kumarsambhav/miniforge3","architecture":3,"sysVersion":"3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:01:00) \\n[Clang 13.0.1 ]","version":{"raw":"3.9.13","major":3,"minor":9,"patch":13,"build":[],"prerelease":["final","0"]},"companyDisplayName":"Anaconda, Inc.","displayName":"Python 3.9.13 ('base')","detailedDisplayName":"Python 3.9.13 ('base': conda)","path":"/Users/kumarsambhav/miniforge3/bin/python"}, Arg 3: false`
]
[INFO 2022-10-19 14:43:24.951]: [
'parseEnvironmentOutput, Class name = O, completed in 0ms, has a truthy return value'
]
[INFO 2022-10-19 14:43:24.951]: [
`getActivatedEnvironmentVariables, Class name = O, completed in 1459ms, has a truthy return value, Arg 1: undefined, Arg 2: {"id":"/Users/kumarsambhav/miniforge3/bin/python","sysPrefix":"/Users/kumarsambhav/miniforge3","envType":"Conda","envName":"base","envPath":"/Users/kumarsambhav/miniforge3","architecture":3,"sysVersion":"3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:01:00) \\n[Clang 13.0.1 ]","version":{"raw":"3.9.13","major":3,"minor":9,"patch":13,"build":[],"prerelease":["final","0"]},"companyDisplayName":"Anaconda, Inc.","displayName":"Python 3.9.13 ('base')","detailedDisplayName":"Python 3.9.13 ('base': conda)","path":"/Users/kumarsambhav/miniforge3/bin/python"}, Arg 3: false`
]
User Settings
languageServer: "Pylance"
Extension version: 2022.18.2
VS Code version: Code 1.73.1 (6261075646f055b99068d3688932416f2346dd3b, 2022-11-09T02:22:48.959Z)
OS version: Darwin arm64 22.1.0
Modes:
Sandboxed: No
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (10 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 10, 9, 9 |
| Memory (System) | 32.00GB (0.30GB free) |
| Process Argv | |
| Screen Reader | yes |
| VM | 0% |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsdebtCode quality issuesCode quality issuesinfo-neededIssue requires more information from posterIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Activity
karrtikr commentedon Nov 20, 2022
Thanks for the issue! Please provide the debug logs, set
python.logging.leveltodebugin User settings, reload window, then perform the steps to reproduce before providing the logs.Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)krsambhav commentedon Nov 20, 2022
gandhis1 commentedon Nov 20, 2022
I get this issue on the latest pre-release version.
krsambhav commentedon Nov 21, 2022
can you check your debug logs, maybe your extension is hung up after
conda info --jsonline. If it is, then you have a problem with conda.eleanorjboyd commentedon Nov 21, 2022
Hello! We want to confirm we received this issue and will get back to you, thanks!
karrtikr commentedon Dec 12, 2022
Thanks for the logs, unfortunately it doesn't seem like it's sufficient to figure out why the text could be stuck, we would probably need to add more logging to figure out why it's stuck.
We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue's priority. Thanks for understanding and the patience!
PeterUdvardi commentedon Dec 21, 2022
I'm facing the exact same, when I open VS Code the python extension doesn't work at all (no intellisense, type checking, linting, references) and it is forever stuck in 'Discovering Python Interpreters'.
This diagnostic report is for the Universal build but I have tried all 4 builds(Apple Silicon, Universal, Insiders - Apple Silicon, Insiders - Universal)
Extension version: 2022.20.1
VS Code version: Code 1.74.2 (Universal) (e8a3071ea4344d9d48ef8a4df2c097372b0c5161, 2022-12-20T10:26:09.430Z)
OS version: Darwin arm64 22.1.0
Modes:
Sandboxed: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
A/B Experiments
Output of the python extension
RohilH commentedon Jan 26, 2023
I am also experiencing this issue after changing my virtual env to have a different version of python. When on a python file, it shows that my virtual env is set to the correct python binary, but intellisense, type hinting, hovering over functions, nothing works. It also has the discovering python interpreters text stuck in the bottom.
Debug logs:
Update: After trying to uninstall and reinstall all my extensions and VSCode itself, I was able to get my intellisense running again after reverting the python extension's version back to v2022.14.0. Hope this helps anyone seeing this issue.
Add logging which could help indicate why `Discovering Python Interpr…
karrtikr commentedon Mar 3, 2023
This is now added in pre-release, try it out:
And then provide the logs as mentioned in the issue template. Set
python.logging.leveltodebugin User settings, reload window, then perform the steps to reproduce before providing the logs.Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)brettcannon commentedon Apr 6, 2023
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.