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

Syntax Error: invalid syntax #5

Open
thelo1212 opened this issue Dec 26, 2024 · 2 comments
Open

Syntax Error: invalid syntax #5

thelo1212 opened this issue Dec 26, 2024 · 2 comments

Comments

@thelo1212
Copy link

i do all steps but when i try to launch main.py cmd give me "syntax error: invalid syntax"
immagine_2024-12-26_231156857

@thelo1212
Copy link
Author

please help me

@g3th
Copy link
Owner

g3th commented Dec 27, 2024

Hiya,

The "invalid syntax" error is occurring because you are launching the program with an old version of Python. "Match" and "Case" statements (i.e. 'switch' statements in C, or 'when' in Kotlin) were introduced in Python3.10, hence when you type "Python" and launch the program, it will not recognize the syntax.

It is suggested you launch the program in PowerShell using the newest version of Python instead, i.e. Python3.10.

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

2 participants