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

前端 未结 8 775
猫巷女王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:34

    I have spent nearly 1 day to solve this problem. The reason is that there is a mismatch between /usr/lib/python2.7/site-packages/ and /usr/local/lib/python2.7/site-packages/ (for my specific folder tree).

    The command to use is as the following:

    mv /usr/lib/python2.7/site-packages/* /usr/local/lib/python2.7/site-packages/
    rmdir /usr/lib/python2.7/site-packages
    ln -s /usr/local/lib/python2.7/site-packages /usr/lib/python2.7/site-packages
    

    I guess you will find 2 /site-packages/ also.

    Just for reference for others.

提交回复
热议问题