【发布时间】:2021-02-02 18:48:25
【问题描述】:
每当我尝试运行 VS code python 终端时,都会收到以下错误:
File "<stdin>", line 1
& C:/Users/tawsi/AppData/Local/Microsoft/WindowsApps/python.exe c:/Users/tawsi/OneDrive/Desktop/Coding/Untitled-1.py
^
SyntaxError: invalid syntax
我该如何解决这个问题?请帮忙
【问题讨论】:
-
你不能从 REPL 运行 Python 文件,它是用来输入 Python 语句的。
-
请参阅this post。有多种方法可以运行 python 脚本。
标签: python visual-studio-code command-line terminal