How to Run Python Scripts

As it is written in the Topic, how can i run the python scripts which i have written. I have already downloaded and ınstalled python3 and git bash but i couldn’t manage to open my code ?
Note: I want to run my code in a Console Terminal like in courses.

What do you see if you type and enter,

Python

in the terminal?

If you script is named script.py,

Python script.py

Personally, I mostly use IDLE since all my doodlings are snippets and small programs. The interactive shell is not much different from the terminal in that respect.

1 Like

When i type Python in terminal, microsoft store page of Python opens automatically however, i have already download and ınstalled python3 but not from microsoft store.


Still getting these error.

When you installed Python, did you also install a taskbar shortcut?


Use CD to navigate to the folder your python script is in.

1 Like

No. How can i ınstall taskbar shortcut ?


I tried to use Git Bash now and used CD but now getting “permission denied”.

Go into the Start menu and see if there is a shortcut there to MINGW64. Click it. If it opens the program, then right-click the shortcut and Pin to Taskbar, should do it.

1 Like

I think i didn’t download it because i can’t find it and i can’t find from where to ınstall while ı’m installing python.

Notice that the interactive shell opens.

1 Like


Yes i can open it but still can’t manage to run my code.

Ctrl-Shift-Z to back out to the terminal. Navigate to the location of the script.

python script.py
1 Like

Thank you.
Finally i could open it.

1 Like