I just ran into infinite Discovering Python Interpreters.
Then I tried almost everything, including deleting extensions, reloading VS Code, changing Python Path and etc.
But finally when I just tried to select the interpreter I came across the error:
Command Python: Select Interpreter resulted in an error: Cannot destructure property ‘filename’ of ‘r’ as it is undefined
However I have PYTHONPATH
defined and python3
works well in console.
P.S. Created issue on Github: https://github.com/microsoft/vscode-python/issues/21481
2
Answers
I assume something with your setting is wrong:
I use the extension:
Selected Interpreter:
Bye the way, I use Thonny 🙂
This might be an issue of cache corruption. If you’re able to run commands in the command palette, try running
Python: Clear cache and reload window
. Source: @karthiknadig’s comment here.