I want to run the hello.py file in google-python-exercises in my Windows cmd terminal

时间:2017-12-18 06:14:25

标签: python cmd

I want to run the hello.py file in google-python-exercises in my Windows cmd terminal. Typing python is showing the exact python version which is Python 2.7.14 but typing google-python-exercises> python hello.py returns error.

1 个答案:

答案 0 :(得分:1)

To run a python file you should be in the same directory as the file (for easiness) then type python filename.py. To change directories on Windows you can type cd folder/directory into cmd prompt.

相关问题