I'm trying to use python driver for cassandra but when I run these three lines in python shell
from cassandra.cluster import Cluster
cluster = Cluster()
session = cluster.connect('demo')
I get this error
cassandra.InvalidRequest: code=2200 [Invalid query] message="Keyspace 'demo' does not exist"
pip freeze says cassandra-driver==2.5.0
I checked cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 2.1.4 | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.
cqlsh> describe keyspaces
system_traces system
cqlsh>
there is no keyspace named 'demo' but I'm just following these two tutorials and they haven't said anything about pre creating keyspace http://planetcassandra.org/getting-started-with-cassandra-and-python/ http://datastax.github.io/python-driver/getting_started.html