cassandra-driver:ImportError:没有名为queue的模块

rau*_*ted 1 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
Run Code Online (Sandbox Code Playgroud)

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

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

cluster = Cluster()
session = cluster.connect('foo')
Run Code Online (Sandbox Code Playgroud)

leo*_*leo 5

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

$sudo easy_install -U six
Run Code Online (Sandbox Code Playgroud)

希望它可以帮到你.