How to overcome the error on Windows while using cassandra-driver

458 views
Skip to first unread message

Pankaja Shankar

unread,
Jul 24, 2024, 3:06:52 PM7/24/24
to DataStax Python Driver for Apache Cassandra User Mailing List
I am running a jupyter notebook for the cassandra - course that I am going through on my own. I am trying to import the cluster as

from cassandra.cluster import Cluster

and I get this error
 The C extension needed to use libev was not found.  This probably means that you didn't have the required build dependencies when installing the driver.  See...

I am running in a VSCode - virtual env - where I am installing the following packages
cassandra-driver
lz4
scales

Any help is greatly appreciated.

Bret McGuire

unread,
Jul 24, 2024, 4:15:32 PM7/24/24
to DataStax Python Driver for Apache Cassandra User Mailing List, Pankaja Shankar
   Hey Pankaja, thanks for the question!  It looks very much like you're encountering the problem described in PYTHON-1386.  We're hoping to have a fix for that in the next release (although it might slip into a subsequent release) but for now on Windows platforms you have the following options:

* Use a Python version less than Python 3.12.  For versions before 3.12 asyncore is still available and the cassandra-driver will use that instead of looking for libev
* Use WSL as suggested in this SO port
* Build a local copy of the wheel with the libev extension included

   Thanks!

  - Bret -

Reply all
Reply to author
Forward
0 new messages