【发布时间】:2017-03-28 16:34:09
【问题描述】:
最近安装了Cassandra. 3.6
安装后报错。
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(或更低)thelastpickle.com/blog/2016/08/16/… 错误是因为3.7中的cqlsh在python驱动程序3分支中使用了api -
@ChrisLohfink 。我尝试使用 cassandra 驱动程序。还是一样的错误
标签: python cassandra pip cqlsh