Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll get you answers.

Click here for Week 7 Materials and Homework.

Registrations still open!


question

JS avatar image
JS asked ·

Getting "ModuleNotFoundError: No module named 'cassandra'" running week 3 Python app on gitpod

Hi, first time using gitpod today, tried to run week3 python exercises. got the following error.

do I need to install anything? thanks.

week3-AppDev-crud/crud-python/db_connection.py
Traceback (most recent call last):
File "/workspace/cassandra-workshop-series/week3-AppDev-crud/crud-python/db_connection.py", line 2, in <module>
from cassandra.cluster import Cluster
ModuleNotFoundError: No module named 'cassandra'
workshop
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

bettina.swynnerton avatar image
bettina.swynnerton answered ·

Hi @JS,

it seems you still need to install the Python cassandra driver.

Navigate to the crud-python folder within the week3-AppDev-crud folder using the terminal with the command below and install the dependencies with pip:

cd week3-AppDev-crud/crud-python/

pip3 install cassandra-driver

This will give you the missing module.

See step 3 here:

https://github.com/DataStax-Academy/cassandra-workshop-series/blob/master/week3-AppDev-crud/README_PYTHON.MD

Let us know how you get on.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.