0

I've tried to run code on the cmd but it isn't working. I'm using windows7 and I changed the path from the default but I wrote the directory on the cmd. Can anyone help me?

1
  • 1
    python <filename> should work if you are in the directory where the script is located. Commented Apr 28, 2020 at 10:19

2 Answers 2

1

python3 yourfilename.py

The above command can run your code, makesure you are at the project directory.

Sign up to request clarification or add additional context in comments.

Comments

0

make sure python in your system path; set python root path to system environment variable;then you can run 'python filename.py' ex

1 Comment

Can't I change the whole path from one drive to another, like "C:\" to say "H:\" ? It's because when installing Python I changed it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.