0

Picture about the problem

I am newbie with python and here is my problem. I installed python on my windows pc and as you can see on this picture, I checked it by the command python --version and it showed me the version, no problem.

But when I ran this very simple code:

my_text = "We made it!"
print(my_text)

It said to me that Python was not found! as you can see in the picture. I searched on the internet, and add the path variable as they said in this guide: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings but it still does not run.

Could you please give me some advise on how to solve this?

Emi OB
  • 2,814
  • 3
  • 13
  • 29

1 Answers1

-1

Try using python to run your .py file, like this

python test.py

If you are seeing instructions that say to use python3 to run Python scripts, it's probably because the author of those instructions uses a system environment where python is used for Python 2 and python3 is used for Python 3.

In your case on Windows, Python 3 was almost certainly installed using python as the command to run, so you should use python and not python3 to run your scripts.

B. Baker
  • 32
  • 5
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). –  Oct 14 '21 at 13:48
  • This does not provide much of an answer to the question. At best your post might be a helpful comment, however you [can't do that yet](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to comment on any post. – martineau Oct 14 '21 at 14:28