Prateek
Prateek

Reputation: 21

Python Cassandra driver not installed, or not on PYTHONPATH

I am getting the below error while running the cqlsh in cassandra 2.2.10 ?? Can somebody help me to pass this hurdle:

[root@rac1 site-packages]# $CASSANDRA_PATH/bin/cqlsh

Python Cassandra driver not installed, or not on PYTHONPATH. You might try “pip install cassandra-driver”.

Python: /usr/local/bin/python Module load path: [‘/opt/cassandra/apache-cassandra-2.2.10/bin/../lib/six-1.7.3-py2.py3-none-any.zip’, ‘/opt/cassandra/apache-cassandra-2.2.10/bin/../lib/futures-2.1.6-py2.py3-none-any.zip’, ‘/opt/cassandra/apache-cassandra-2.2.10/bin/../lib/cassandra-driver-internal-only-3.5.0.post0-d8d0456.zip/cassandra-driver-3.5.0.post0-d8d0456’, ‘/opt/cassandra/apache-cassandra-2.2.10/bin’, ‘/usr/local/lib/python2.7/site-packages’, ‘/usr/local/lib/python27.zip’, ‘/usr/local/lib/python2.7’, ‘/usr/local/lib/python2.7/plat-linux2’, ‘/usr/local/lib/python2.7/lib-tk’, ‘/usr/local/lib/python2.7/lib-old’, ‘/usr/local/lib/python2.7/lib-dynload’]

Error: can’t decompress data; zlib not available

Upvotes: 2

Views: 2661

Answers (2)

Rémi.B
Rémi.B

Reputation: 321

For me (ubuntu 20.04, cassandra 3.11.13), the symbolic link /usr/bin/python was pointing to /usr/bin/python3.

When changing it to point to /usr/bin/python2, it worked.

ln -sf /usr/bin/python2 /usr/bin/python

Upvotes: 0

Adam Holmberg
Adam Holmberg

Reputation: 7365

Cassandra uses the python driver bundled in-tree in a zip file. If your Python runtime was not built with zlib support, it cannot use the zip archive in the PYTHONPATH. Either install the driver directly (pip install) as suggested, or put a correctly configured Python runtime in your path.

Upvotes: 0

Related Questions