CQLSH client - module' object has no attribute 'parse_options CQLSH client - module' object has no attribute 'parse_options php php

CQLSH client - module' object has no attribute 'parse_options


Has the same issue when I use cqlsh from pip install cqlsh.Try just use cassandra's tool cqlsh

sudo docker run -it cassandra /usr/bin/cqlsh

Refer to jira


I met a similar problem, the reason for my scenario is that the default cqlsh path is /usr/local/bin/cqlsh. (check with command $ which cqlsh)

Solution: using Cassandra shipped /usr/bin/cqlsh to connect the Cassandra server or run some command. For example, connect to Cassandra server using command:

$ /usr/bin/cqlsh <cassandra_listen_ip>

OR run command with

$ /usr/bin/cqlsh <cassandra_listen_ip> -e "<command>"


Looks like the pip version has some issues, you should install via the official packages instead like:

apt install wget apt-transport-httpswget -q -O - https://www.apache.org/dist/cassandra/KEYS | apt-key add -sh -c 'echo "deb http://www.apache.org/dist/cassandra/debian 311x main" > /etc/apt/sources.list.d/cassandra.list'apt updateapt install -y cassandra

Note this will also include the cassandra services, so if you don't want those to be running you may have to manually disable them.