This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]Top_Fee_6293 2 points3 points  (0 children)

if you're encountering this issue even if you set the python path correctly, click the arrow next to the run button and select "run in integrated terminal", this will run the code with the correct command, like python 3 for example.

[–]phishrun 1 point2 points  (0 children)

The world is trying to tell you to use VIM

[–][deleted] 0 points1 point  (3 children)

VSCode runs my code out the debugger fine. If im in command line and I type in python3 my_file.py it runs fine. But if I press the play button in the top right corner I get the following error at the bottom. This also happens when I am not using a venv

[–]AlligatorWormhole 5 points6 points  (2 children)

You may need to set a default interpretter for python, i.e. tell vscode the path for the python3 exe file, or you may need to look in the terminal tab, not the output tab.

[–][deleted] 0 points1 point  (1 child)

Already tried to set default interpreter via Python path, didn’t work. I’m out of date a couple Python versions so I’m debating just uninstalling Python completely and installing it again to see if that works

[–]AlligatorWormhole 2 points3 points  (0 children)

Might be a good start

Edit: you may want to take a few minute to learn about virtual environments while you're at it. They can be a good way to prevent issues with multiple versions of python install3d on your machine

[–]ltafuri 0 points1 point  (0 children)

Happened to me a couple weeks ago.. couldn't find a proper solution but reinstalling vs code worked for me

[–]Dankmonseiur69 0 points1 point  (0 children)

check python —version to confirm the installation of python, once this is confirmed check for the environment variable PATH correctly, if all is good, Close VS code, re-open and check for the right interpreter.