I have installed cassandra-driver through pip,
! pip install cassandra-driver
Then import also works
import Cassandra
But connect to DB, which doesn't work
from cassandra.cluster import Cluster
try: cluster = Cluster(['127.0.0.1']) session = cluster.connect()
except Exception as e: print(e)
The error message is:
('Unable to connect to any servers', {'127.0.0.1:9042': ConnectionRefusedError(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
I have googled a lot, can't figure out where the problem is, and think it might because of the config:
JAVA_HOME is as:
c:\program files\Java\jdk_13.0.2
Cassandra is under:
C:\Users\xx\anaconda3\Lib\site-packages
I am not good at the config. May I ask whether there is a specific requirement for the config?
I work on it in Jupyter Notebook in Anaconda.
Thanks.