1

I am using a widows virtual desktop as my developer machine. I had been using datastax-studio to access a common-dataStax-cassandra-cluster installed on remote server machines.

Apparently, not all CQL commands are supported by datastax-studio, for example COPY, LOAD commands etc. So I tried to install CQLSH utility on my developer machine.

Seems Cqlsh is meant to be used only on Linux-based platforms having python. So I tried to use it within git-bash on my windows machine. First I unzipped the gzip file using git-bash and then got python installed on my machine.

Now when I run the xxxx/cqlsh-6.8.31/bin/cqlsh.sh or xxxx/cqlsh-6.8.31/bin/cqlsh.py , I get below error.
Disclaimer- I have never worked on python.

$ ./cqlsh
Traceback (most recent call last):
  File "C:\projects\apps\CASSANDRA\cqlsh-6.8.31\bin\dsecqlsh.py", line 95, in <module>
    import cqlsh  # nopep8
  File "C:\projects\apps\CASSANDRA\cqlsh-6.8.31\bin\cqlsh.py", line 151, in <module>
    import six
ModuleNotFoundError: No module named 'six'

Question is

  1. Is it even possible to run Cqlsh on a widows machine not having a complete cassandra installation ?
  2. If answer to above is yes, then how to set it up ?
ThrowableException
  • 1,168
  • 1
  • 8
  • 29

1 Answers1

0

It should be possible, yes. Which version of Python do you have installed? These days cqlsh runs on only specific versions of Python 3; 3.6 to 3.10, I think.

Note: There is a breaking change in Python 3.11 for cqlsh

In any case, if you have a version of Python in that range, you should be able to install it using Pip (Python's package manager).

pip install cqlsh

Pip will make sure you get all of the required dependencies, including the six module.

Possible Quick Fix

Just a parting thought, but maybe try installing six:

pip install six
Aaron
  • 55,518
  • 11
  • 116
  • 132
  • 2
    The latest release of the cqlsh package on pypi.org, version 6.1.0, has a fix I wrote to support installing on Windows as an executable. The DataStax Python driver still includes python 2 support, and thus it will require 'six'. – Brad Schoening Mar 16 '23 at 18:47