1

If anyone can help, please do so as I have been trying to fix this for hours to no avail. And yes I have tried numerous solutions found on Google, Stack Overflow, and even Reddit.

I have been using Python with VSCode for the longest time but now it suddenly doesn't work. I'm on version 3.10.7 (Windows) as seen below: Python version in powershell terminal

As you can see it asks me to select the interpreter. I actually did by clicking that and selecting the interpreter. But when I do this comes out:

Invalid interpreter

Here is my settings.json file, on the python portion:

settings.json

I tried uninstalling and reinstalling both python and VSCode, as well as switching to pre-release version of the Python extension, still does not do it.

I also have my PATH folder include Python folders. PATH environmental variables

Hope anyone can help T-T

EDIT:

Here are my environmental variables Environmental Variables

Here's what my Select Interpreter interface shows enter image description here

Finally found a solution! I downgraded the Python extension for vscode to 10.1 Install another version

Code works as intended but interpreter still not detected enter image description here

Pongbao
  • 53
  • 5

1 Answers1

0

Try to use the pre-release version of python. If it is invalid, try to reinstall vscode.

enter image description here

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13
  • I switched to an older version instead and it worked. Still doesn't recognize my interpreter but at least the code runs now. – Pongbao Sep 19 '22 at 06:41
  • @Pongbao It seems that this is not a good phenomenon. Although it can temporarily solve the problem, I suggest you reinstall vscode – MingJie-MSFT Sep 19 '22 at 06:50
  • I actually already did that more than twice but the error persists. Maybe in a future update in the extension, this would be solved. – Pongbao Sep 19 '22 at 07:09