python - 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
请帮助我理解问题并解决它。
解决方案
你首先需要用 cd 改变目的地
推荐阅读
- javascript - 如何使用 Amazon Express Button 确认购买商品?
- javascript - 如果多个事件处理程序附加在同一元素上,则 jquery 事件处理程序方法阻止执行的顺序
- sql - 动态查询中的“字符串后的未闭合引号”错误
- python - 在运行 runserver 时在 Django3.0.4 上获取 ImportError
- java - Maven Plugin Project 不能使用表达式注入 MavenSession 或 MavenProject
- flutter - Flutter Httpheaders 无效内容错误
- java - AWS S3 是否仅用于文件存储?我可以用它来存储复杂对象的列表吗?
- visual-studio-code - 如何更改“test git”以指向另一个文件目录?
- python - 套接字数据最大限制异常
- reactjs - 在 Gatsby 入门博客中,如何将主页中的最新帖子数量从 3 个增加到 20 个