Syntax error at python 3.5
See original GitHub issueVersion 0.11.0 works fine
$ python3 --version
Python 3.5.2
Any version since 1.0.0 till latest 1.4.0 seems to be incompatible with python 3.5, but currently at pypi the required python version is specified as python=~3.5
./test.py
Traceback (most recent call last):
File "./test.py", line 3, in <module>
from simple_term_menu import TerminalMenu
File "/home/developer/.local/lib/python3.5/site-packages/simple_term_menu.py", line 566
):
^
SyntaxError: invalid syntax
test file, simply try to import:
$ cat test.py
#!/usr/bin/env python3
from simple_term_menu import TerminalMenu
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
invalid syntax on Python 3.5.2 · Issue #2541 · pypa/setuptools
I get the following error: File "xxxxxxxxxxxxxxxxxxxxxxxxxx/ve3/lib/python3.5/site-packages/setuptools/command/install_scripts.py", line 17, ...
Read more >SyntaxError: invalid syntax - Python 3.5 - Stack Overflow
In Python 3.x input() just returns a string like raw_input() in Python 2.x. Share.
Read more >SyntaxError: invalid syntax - Discussions on Python.org
Based on the example here, I tried to run the following code snippet but failed: run_mode, num_repeats, num_runs = 'short', 5, ...
Read more >pip --version returns SyntaxError (invalid syntax) after installation
According to phd's post, the root cause is the PIP version installed by default being not compatible with the old Python version 3.4....
Read more >Type hints in Python 3.5 project shown as syntax error when ...
Type hints in Python 3.5 project shown as syntax error when opening 2.7 project in another window ... I have one project with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks at @ostanislaw and @GPMueller for pointing me to this problem. The trailing comma is indeed the problem. Before
v1.0.0
, no arguments were keyword-only arguments (started by*,
) and a trailing comma was allowed in Python 3.5 in such parameter lists. With keyword-only arguments, a trailing comma is only allowed in Python >= 3.6 (for whatever reason, since keyword-only arguments are part of the language since Python 3.0). I removed the trailing comma, added a CI check for Python 3.5 compatibility and published a new release (v1.4.1
) which should now work with Python 3.5.Confirmed, version 1.4.1 is fixed. Thanks, that was really quick.