简体   繁体   中英

python: can't open file in macbook terminal - [Errno 2]!

In my macbook air terminal I wrote

python eggshell.py

but I got this error

python: can't open file 'eggshell.py': [Errno 2] No such file or directory s-user:/ user$

After I got that error I tried a number of things, like specifying exactly were eggshell.py is:

python Users/myuser/Eggshell/eggshell.py

Doing that just gave me a different Errno 2 error:

OSError: [Errno 2] No such file or directory: 'modules/commands/macOS'

If you have anything that can help me figure this out, I'd be incredibly grateful, thanks. PS I'll attach an image of where the eggshell.py is located

eggshell.py is actually located in a folder in my documents, but it shows up in the documents too, so I really don't know why python eggshell.py doesn't work.

截图

You have to be in the directory the eggshell.py was located. (use cd to navigate)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM