Unable to open cqlsh Apache cassandra - ImportError: No module named cqlshlib

前端 未结 8 747
猫巷女王i
猫巷女王i 2020-12-18 20:55

I am new to cassandra ! Have downloaded the apacahe cassandra 2.1.2 package and initialy was able to connect to cqlsh but then after installing CCM i am unable to connect ,

8条回答
  •  感情败类
    2020-12-18 21:14

    Workaround:

    I assume that you have already installed Cassandra and cqlshlib has been installed in /usr/lib/python2.7/site-packages/

    `ln -s /usr/lib/python2.7/site-packages/cqlshlib /usr/local/lib/python2.7/site-packages/cqlshlib` 
    

    (replace /usr/lib/python2.7/site-packages with your python directory).

    More Detail:

    One possibility is that your default python is not in /usr/bin/. Say it has been installed in /usr/local/bin/. However, Cassandra seems to install cqlshlib in /usr/lib/python2.7/site-packages for some reason. As a result, the default python cannot find cqlshlib package when you run cqlsh command.

提交回复
热议问题