我无法在代码中运行代码。当我输入$ code hello.py时,就会发生这样的情况:
发布于 2019-06-23 03:33:19
在您使用code hello.py的图像中。您应该使用python hello.py。只有在安装Python软件时检查了“”,才能在命令提示符上运行。
如果你在Mac上
在Mac中,Python 2.7是自动安装的。如果您想要使用Python 3,那么您必须手动从Python官方网站安装,并使用python3 hello.py来使用Python3。
发布于 2019-06-23 03:41:13
请始终记住,将使用以下命令运行Python文件:python yourfile_name.py。
在您的映像中,您试图使用以下命令运行Python:code hello.py
不要使用code hello.py,而是尝试用python hello.py来更改它。
https://stackoverflow.com/questions/56720780
复制相似问题