简体   繁体   English

Errno2在python中没有这样的文件或目录。 无法打开.py或.csv或.tar.gz

[英]Errno2 no such file or directory in python. Can't open .py or .csv or .tar.gz

Donnas-MBP:~ donna$ cd Applications
Donnas-MBP:Applications donna$ python3 app.py
/Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python: can't open file 'app.py': [Errno 2] No such file or directory

app.py is saved in Applications. app.py保存在应用程序中。 I know it's there. 我知道它在那里。 All of my .csv and .py files are there. 我所有的.csv和.py文件都在那里。 I know because it was working before. 我知道,因为它以前工作过。 But now nothing is working. 但是现在什么都没有用。 I tried absolute path and that did not work. 我尝试了绝对路径,但没有用。 I'm using high sierra. 我使用的是高山脉。

I tried running ls 我尝试运行ls

Donnas-MBP:Applications donna$ ls
Documents   Utilities

My files were not here. 我的文件不在这里。 This used to work fine. 过去工作正常。 Not sure what happened. 不知道发生了什么。

FRom the result of ls you posted, there are no files in Applications just those two directories. ls发布的结果来看, Applications中没有文件,只有这两个目录。 Perhaps the files you seek are in those directories not Applications . 也许您要查找的文件不在这些目录中,而不是在Applications

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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