首页 > 解决方案 > Mac 终端上没有用于 python 的此类文件或目录

问题描述

hello.py是我的第一个 python 程序。它保存在我的桌面上。

在终端我写在前面

user@AA-MacBook-Air ~ % python3 hello.py

错误是

can't open file 'hello.py': [Errno 2] No such file or directory

请帮助我理解问题并解决它。

标签: pythonpython-3.x

解决方案


你首先需要用 cd 改变目的地


推荐阅读