6

I am a java developer and am very new to Linux and Cassandra. I am using CentOS6. I am trying to install Cassandra3.4 in the Linux machine. I have followed the steps mentioned in here.

Looks like the Linux machine already has Python installed. When I tried python -V in my putty connected to the Linux machine, I got the following output in my putty. Python 2.6.6 . I am assuming python is installed.FYKI, I have no clue how python works.

After I completed the installation process, I ran the cassandra service with the following command. /opt/cassandra/bin/cassandra -f -R &. It was all good.

Now, here comes the problem. When I run ./cqlsh I get the following error.

No appropriate python interpreter found.

I did my research and tried out a couple of options, but nothing was fruitful so far.

  1. Try 1

  2. Try 2

  3. Try 3

  4. Try 4

  5. Try 5

None of the above links worked for me. Or probably I am not smart enough to understand. Any help would be much appreciated. Thanks.

Community
  • 1
  • 1
Andy
  • 5,433
  • 6
  • 31
  • 38

2 Answers2

6

I think you should try to update your Python to 2.7 version , because Cassandra 3.x requires Python 2.7

You can refer:

[http://thecpaneladmin.com/how-to-upgrade-python-on-centos/][1]

Assuming you have not changed any python configuration while installation, it should work. You can try and let us know.

Raju
  • 448
  • 1
  • 9
  • 24
Akki
  • 2,179
  • 8
  • 21
  • 37
  • Will try that and get back to you. – Andy Mar 25 '16 at 08:42
  • Firtsly, thanks for your answer. I followed the steps mentioned in the site you mentioned. I am stuck in this step: './configure –prefix=/usr/local' . I am getting the following error. _configure: error: invalid variable name: `prefix'_ Any clue? – Andy Mar 25 '16 at 10:10
  • @Andy You are copypasting the command from the site , try typing it its --prefix ( two hyphens - - ) – Akki Mar 25 '16 at 11:56
3

Install your won version of python from source:

wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz

tar -xvzf Python-2.7.6.tgz

cd Python-2.7.6

./configure --prefix=/usr/local

make

make install

Now any scripts that require the alternate version should have the following shebang:

#!/usr/local/bin/python2.7

using pip:

/usr/local/bin/pip2.7

source

kinkajou
  • 3,664
  • 25
  • 75
  • 128