2017-09-20 116 views
1

我在cassandra 2.2.10中運行cqlsh時出現以下錯誤?有人可以幫我渡過這個障礙:未安裝Python Cassandra驅動程序,或者沒有安裝PYTHONPATH

[[email protected] 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

+0

錯誤消息說明了一切:使用'pip install cassandra-driver'安裝'cassandra-driver'。 – Fejs

+0

嗨Prateek我也面臨同樣的問題,你有沒有找到任何解決方案。 – Ganesh

回答

0

卡桑德拉使用在一個zip文件中樹捆綁蟒蛇的驅動程序。如果您的Python運行時不是用zlib支持構建的,則它不能使用PYTHONPATH中的zip壓縮文件。按照建議直接安裝驅動程序(pip install),或者在路徑中放置正確配置的Python運行時。