Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running cqlsh returns "ModuleNotFoundError: No module named 'six.moves'"

I have problem with running cqshl after install Appache Cassandra on Ubuntu 24.04 LTS:

Traceback (most recent call last):
  File "/usr/bin/cqlsh.py", line 134, in <module>
    from cassandra.cluster import Cluster
  File "/usr/share/cassandra/lib/cassandra-driver-internal-only-3.25.0.zip/cassandra-driver-3.25.0/cassandra/cluster.py", line 33, in <module>
ModuleNotFoundError: No module named 'six.moves'

I've tried to update Python 3, I've tried to install Cassandra many times, I've tried to modify the YAML file associated with Cassandra in the same way as GPT-4 told me, but it even has a problem with it.

like image 367
arturo r Avatar asked Aug 30 '25 16:08

arturo r


1 Answers

Which version of Python 3 are you running?

Unfortunately, cqlsh has issues with newer versions of Python 3. In fact, I know for sure that Python 3.12 breaks it (with that exact, same error message).

Basically, downgrade to Python 3.9 and it should work.

Note: You can also use something like pyenv to manage multiple versions of Python.

like image 123
Aaron Avatar answered Sep 02 '25 07:09

Aaron