Help - Terminal says "No such file or directory"

Hi,
I cannot get terminal to print lesson one. It won’t even print the original lesson 1 that I did a few weeks ago (it worked perfectly then…I started the book over as a refresher after a short break from learning). Screenshots attached for reference. Keeps telling me “[Errno 2] No such file or directory”

What am I doing wrong? Any help would be greatly appreciated. Screenshots for reference here: https://www.dropbox.com/sh/9f27czcxz7nkcxs/AABLBn2lR8RxDsrrovDdt6jVa?dl=0

Thank you!

If it says “No such file or directory” that means the ex1.py file is not where you are in the terminal. If you do this:

pwd
ls

You should see the same directory you see in that screenshot, and you should see ex1.py there. If not then you have to cd to where that directory is.

If you don’t know how to do any of the above then that’s a sign you should go do Appendix A and get the crash course in the terminal. That’ll teach you all you need to find the file in the terminal.

Hi! THANK YOU! I had been kicking around this solution but had not yet gotten it exactly right. I was able to get it to print just now. Thank you for the reply. Appreciate your time.

1 Like