Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

显示“SyntaxError: invalid syntax” #83

Open
hujihan opened this issue Aug 4, 2019 · 5 comments
Open

显示“SyntaxError: invalid syntax” #83

hujihan opened this issue Aug 4, 2019 · 5 comments

Comments

@hujihan
Copy link

hujihan commented Aug 4, 2019

现在好像是不行了,不管是什么都是“SyntaxError: invalid syntax”

@atlas-comstock
Copy link
Owner

@hujihan 我试了没问题。你用什么操作系统,命令时什么,截图看看?

@hujihan
Copy link
Author

hujihan commented Aug 5, 2019

@hujihan我试了没问题。你用什么操作系统,命令时什么,截图看看?


就是这样子,Windows10 64位系统

@edorphin
Copy link

edorphin commented Aug 5, 2019

WIN7 X64下也是如此问题 看了下main.py没毛病 也是invalid syntax

@YangKian
Copy link
Contributor

您是在python解释器里执行的吧,解释器里直接运行的是python的代码,而python main.py命令是脚本命令,不是python代码,所以会报invalid syntax。可以在cmd中到python文件的目录下运行脚本,或是到pycharmterminal里直接运行脚本。

@so1ve
Copy link

so1ve commented Jul 13, 2020

哦对了 还有不能加$.........................

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants