Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra: File "cqlsh", line 95 except ImportError, e:

The version of Cassandra that you are using is only compatible with Python 2.x.

The following syntax:

except ImportError, e:

was deprecated in Python 2.7 and removed in Python 3.x. Nowadays, you use the as keyword:

except ImportError as e:

This means that you need to either downgrade to Python 2.x or get a version of Cassandra that is compatible with Python 3.x.


You should install python 2 and add it to your environment variable as stated above

  1. py -2 -V(verify that you have python 2 installed)
  2. py -2 -m cqlsh (from your Cassandra bin folder.)
  3. View image here.