skip to Main Content

I just ran into infinite Discovering Python Interpreters.

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

Error

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


  1. I assume something with your setting is wrong:
    enter image description here
    I use the extension:
    enter image description here
    Selected Interpreter:
    enter image description here
    Bye the way, I use Thonny 🙂

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search