最近,我已經安裝了Cassandra. 3.6
安裝後,出現錯誤。cqlsh :: ImportError:無法導入名稱cql_keywords_reserved
Connection error: ('Unable to connect to any servers', {'127.0.0.1': TypeError('ref() does not take keyword arguments',)})
爲了解決這個問題,我已經跟着
pip install cassandra-driver==2.7.2
pip install cassandra-driver
export CQLSH_NO_BUNDLED=true
我的Python版本是2.7
現在,當我運行cqlsh
,我收到以下錯誤
Traceback (most recent call last):
File "/usr/bin/cqlsh.py", line 167, in <module>
from cqlshlib import cql3handling, cqlhandling, pylexotron, sslhandling
File "/usr/lib/python2.7/dist-packages/cqlshlib/cql3handling.py", line 17, in <module>
from .cqlhandling import CqlParsingRuleSet, Hint
File "/usr/lib/python2.7/dist-packages/cqlshlib/cqlhandling.py", line 21, in <module>
from cassandra.metadata import cql_keywords_reserved
ImportError: cannot import name cql_keywords_reserved
我該如何解決這個錯誤?我怎樣才能運行cassandra與我的錯誤?
'pip install cassandra-driver == 3.7.1'?或者安裝python 2.7.11(或更少)http://thelastpickle.com/blog/2016/08/16/cqlsh-broken-on-fresh-installs.html這個錯誤是因爲3.7中的cqlsh在python中使用api司機3分支 –
@ChrisLohfink。我試着用卡桑德拉司機。仍然有相同的錯誤 –