python d: est.py File "<stdin>", line 1 python d: est.py ^ SyntaxError: invalid syntax

pyhton出错:

python d: est.py
File "<stdin>", line 1
python d: est.py
^
SyntaxError: invalid syntax

原因:

出错是因为你已经进入python解释器,而不是 在cmd环境里

如果要运行helloworld.py这个文件,你需要在cmd里直接运行

显示是这样的

原文地址:https://www.cnblogs.com/wuxiang/p/7691710.html