r/PythonLearning • • Jul 02 '25

Check

Post image

What might be the problem??

2 Upvotes

16 comments sorted by

6

u/6sailhatan66 Jul 02 '25

After you install python like the other commenter mentioned, you have to save the python file before you can run it. VsCode shows a little white dot next to the file name in the tab.

If I’m being honest though, I would HIGHLY recommend learning to find solutions to your problems before reaching out. If this sounds harsh, I apologize, but coding is problem solving. It’s taking the information you have and finding a solution to make it work the way you want it. Learn to google, use stack overflow, cheat sheets, YouTube, whatever resource fits your needs. Start with a python fundamentals for beginners video on YouTube. It will take you through the basic installation of python along with the fundamentals of coding in the language.

It’s gonna be a hard road ahead if you don’t learn how to learn, my friend.

2

u/More_Yard1919 Jul 02 '25

The issue is not that the file is not saved, the issue is that it can't find the python interpreter.

2

u/6sailhatan66 Jul 02 '25

Right, being why I said, “after you install python like the other commenter mentioned”

4

u/More_Yard1919 Jul 02 '25

I apologize, I can't read

1

u/6sailhatan66 Jul 02 '25

It’s all good 😂

1

u/6sailhatan66 Jul 02 '25

But it’s also not saved.

3

u/IdekOfAUserNameButOk Jul 03 '25

Are screenshots this hard nowadays?

2

u/Scholfo Jul 02 '25

Your machine can’t read or run python files (.py) by default. You need to install python first, e.g. by typing 'python' (as the error message aka your machine tells you). Otherwise your machine does not know how to handle .py files.

1

u/More_Yard1919 Jul 02 '25

The issue is that it can't find the python interpreter to run your code. If python is not installed, you will need to go get it. You can get the installer online. Assuming that you have installed python already, restart VSCode.

There is something called the path environment variable on your machine. When you open programs from the terminal, it uses the path variable to check directories for those programs. When you launch VSCode, the environment variables are checked at launch and then not again. If that still does not work, you will need to make sure that the directory python is installed to is included in your path variable.

https://answers.microsoft.com/en-us/windows/forum/all/adding-path-variable/97300613-20cb-4d85-8d0e-cc9d3549ba23

1

u/fredhamptonsaid Jul 02 '25

How are you learning Python? Any tutorials should start with showing you how to install Python. Or at least mention in passing that you need to install Python.

1

u/lolcrunchy Jul 02 '25

Hi Sumanth Reddy

1

u/insharib Jul 03 '25

Better Install PyCharm