Cassandra: "cqlsh" line 145 except ImportError, e: ^ SyntaxError: invalid syntax

Vaibhav Gupta picture Vaibhav Gupta · Jan 12, 2018 · Viewed 14.3k times · Source

Installed cassandra 3.11.1 version in Windows 10 with jdk 1.8.0_151 and python 3.6. All paths available in environment variables. When I run cqlsh in command prompt, I get the below error:

File "C:\Cassandra\bin\\cqlsh.py", line 145
    except ImportError, e:
                      ^
SyntaxError: invalid syntax

Anyone, Any luck with the above error?

Answer

Priyanshu Singh picture Priyanshu Singh · Aug 26, 2018

I had the same problem.I downgrade python to 2.7 and it works for me.

ERROR:

cqlsh.py", line 146 except ImportError, e: ^ SyntaxError: invalid syntax