Just dipped my toes into Python this morning and I'm trying to pare down how long of a directory I have to input to run my *.py programs.
My Python install directory is C:\Python\Python39
My work folder is C:\python_work
I made a file called hello_world.py
and would like to run it directly from the C:\python_work
folder, but it won't let me. It just returns C:\python_work
instead of "Hello Python World!"
.
The book I'm following says I should be able to type C:\python_work>python hello_world.py
. That doesn't work. I have to type C:\python_work>C:\Python\Python39\python hello_world.py
.
How do I get python to run directly from the python_work
directory? I hope what I've written has made sense.
Thanks!
EDIT: PATH option is selected on install. Did that before coming here.