I'm trying to run the cassandra cqlsh
command using python 3 on windows 10.
When I run the command I get this error:
cqlsh
File "C:\Program Files\apache-cassandra-3.11.6\bin\\cqlsh.py", line 248
CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc')
^
SyntaxError: invalid syntax
This is where the line is that it's complaining about in the script:
if hasattr(options, 'cqlshrc'):
CONFIG_FILE = options.cqlshrc
if not os.path.exists(CONFIG_FILE):
print('\nWarning: Specified cqlshrc location `%s` does not exist. Using `%s` instead.\n' % (CONFIG_FILE, HISTORY_DIR)
CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc')
Cassandra seems to be running just fine, I just need a way to connect with it.
I'm on Python 3.8.3, and I would prefer not to downgrade to 2.7 if I can help it.
How can I get this working?
Released version of cqlsh
supports only Python 2.7, so it can't work on the Python 3.x.
Support for Python 3 will be only in the Cassandra 4, that hopefully will be released this year. See CASSANDRA-15659, CASSANDRA-10190, CASSANDRA-15573 for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With