Your issue is you are using python3 with instructions for python2
python 3 has a different print statement.
You have to change (python2):
python -c ‘import cassandra; print cassandra.__version__’
To python3 syntax:
python -c 'import cassandra; print(cassandra.__version__)’
Breakdown:
python -c
This part tell python to use the following command (as specified by the quoted string that follows -c).
quoted string (part 1) ‘import cassandra;
The first part of the quoted string tells python to import the cassandra library you just installed, the semicolon allows you to specify
more than one command on the same line.
quoted string (part 2) print(cassandra.__version__)’
In cassandra 3 your print statements need parenthesis around the thing you want to print. In version 2 you didn’t need this, which is
why your example was failing.
Make sure you are aware of which version of python you are using for your various development projects.
environments can have different packages installed. For example you may want to write a program for Cassandra in one env and
write another program that has nothing to do with cassandra in a different env.