python:无法在macbook终端中打开文件 - [Errno 2]!

问题描述 投票:0回答:1

在我写的macbook air terminal中

python eggshell.py

但我得到了这个错误

python:无法打开文件'eggshell.py':[Errno 2]没有这样的文件或目录s-user:/ user $

在我收到错误后,我尝试了很多东西,比如指定egghell.py是:

python Users/myuser/Eggshell/eggshell.py

这样做只是给了我一个不同的Errno 2错误:

OSError:[Errno 2]没有这样的文件或目录:'modules / commands / macOS'

如果你有任何可以帮助我解决这个问题的事情,我会非常感激,谢谢。 P.S我将附上eggshell.py所在位置的图像

eggshell.py实际上位于我的文档中的一个文件夹中,但它也显示在文档中,所以我真的不知道为什么python eggshell.py不起作用。

screenshot

python macos file terminal errno
1个回答
0
投票

你必须在eggshell.py所在的目录中。 (使用cd导航)

© www.soinside.com 2019 - 2024. All rights reserved.