为什么我不能安装Cassandra-driver

时间:2016-10-16 16:00:28

标签: python database cassandra

我正在研究Cassandra的文件。 但是当我使用" pip install cassandra-driver"安装cassandra-driver,失败了:



weikairen2@weikairen2-virtual-machine:~$ pip install cassandra-driver
Collecting cassandra-driver
  Using cached cassandra-driver-3.7.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six>=1.6 in ./.local/lib/python2.7/site-packages (from cassandra-driver)
Requirement already satisfied (use --upgrade to upgrade): futures in ./.local/lib/python2.7/site-packages (from cassandra-driver)
Building wheels for collected packages: cassandra-driver
  Running setup.py bdist_wheel for cassandra-driver ... 




^Z
[1]+  已停止               pip install cassandra-driver
weikairen2@weikairen2-virtual-machine:~$ ls
cassandra               jdk              公共的  图片  音乐
cassandra-driver-3.7.0  pycharm          模板    文档  桌面
examples.desktop        PycharmProjects  视频    下载
weikairen2@weikairen2-virtual-machine:~$ cd cassandra-driver-3.7.0
weikairen2@weikairen2-virtual-machine:~/cassandra-driver-3.7.0$ ls
cassandra                  ez_setup.py  MANIFEST.in  README.rst  setup.py
cassandra_driver.egg-info  LICENSE      PKG-INFO     setup.cfg
weikairen2@weikairen2-virtual-machine:~/cassandra-driver-3.7.0$ python setup.py install

^Z
[2]+  已停止               python setup.py install
weikairen2@weikairen2-virtual-machine:~/cassandra-driver-3.7.0$ python setup.py build




如你所见,没有回应 我必须通过ctrl + z

来阻止它

我也试过manul安装 没有回应

那么错误在哪里?我该如何解决?

2 个答案:

答案 0 :(得分:20)

我想出来

" sudo pip install cassandra-driver"

需要一点时间 我太急躁了

答案 1 :(得分:0)

这需要很长时间,在某些环境中约 10 分钟。你可以使用

$ # installing from source
$ CASS_DRIVER_BUILD_CONCURRENCY=8 python setup.py install
$ # installing from pip
$ CASS_DRIVER_BUILD_CONCURRENCY=8 pip install cassandra-driver

加快速度。

来源:https://docs.datastax.com/en/developer/python-driver/3.25/installation/