python - Cassandra 驱动程序 : ImportError: No module named queue

标签 python cassandra datastax

我正在 OSX 10.11 上使用 pip 安装 cassandra-driver。 直接从 pip 出来,cassandra-driver 给出了这个错误:

traceback (most recent call last):   File "syncS3ToCassandra.py", line 19, in <module>
from cassandra.cluster import Cluster   File "cassandra/cluster.py", line 48, in init cassandra.cluster (cassandra/cluster.c:74747)   
File "cassandra/connection.py", line 38, in init cassandra.connection (cassandra/connection.c:28007) 
ImportError: No module named queue

我还没有尝试从源代码构建 cassandra-driver,但 pip 是推荐的方法。这是我的代码:

from cassandra.cluster import Cluster
from cassandra.policies import DCAwareRoundRobinPolicy

cluster = Cluster()
session = cluster.connect('foo')

最佳答案

我在我的 mbp 上也遇到了这个问题。并且还有一些其他问题无法卸载六。我使用 easy_install 将版本从 1.4.1 更新到 1.10.0 来修复它。

$sudo easy_install -U six

希望对您有所帮助。

关于python - Cassandra 驱动程序 : ImportError: No module named queue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37666269/

相关文章:

python - Jenkins :显示测试失败的日期和时间

Python如何根据列表中的项目从字符串中剥离字符串

cassandra - 为什么创建表需要这么长时间?

ruby-on-rails - 使用Rails 2.3.5和cassandra数据库创建应用程序

linux - 从 5.0.7 升级到 dse 6.7.5 后索引分区出错

python - 无法使用 DataStax Python 驱动程序远程连接到 Cassandra

python - 在 python 中 pickle 时省略大对象

python - 在 Python 中解码编码的 unicode 字符串

java - 自动生成表格

java - Cassandra - 将一个大字段设置为 null 不归还磁盘空间