can't open file: [Errno 2]没有这样的文件或目录


seohyun3545@tpu-vm:~$ python3 tomato.py

python3: can't open file '/home/seohyun3545/蕃茄.py': [Errno 2]没有这样的文件或目录

我不能在云shell上运行python。因为我使用了pwd来检查当前目录,所以我确信'tomato.py'在同一个目录('/home/seohyun3545')中。我该如何解决这个问题?

我猜它与TPU有关,因为我没有连接TPU时没有任何问题。[在这里输入图像描述](https://i.stack。imgurenter图像描述here.com/zMzvj.png)

这不应该是TPU相关的问题。

您可以尝试以下两种方法来查看tomato.py是否在当前目录中:

  1. 运行ls -lh,查看tomato.py是否存在
  2. 运行test -f tomato.py; echo $?。如果返回代码1,则表示tomato.py文件不存在。

最新更新