07-30-2023, 02:02 PM
After installing cassandra driver by running the command:
`sudo pip3 install cassandra-driver`, I am getting the error `ModuleNotFoundError: No module named 'cassandra'` when I try to import the module by running the line `cassandra`.
I then tried to see what all modules are installed in `pip3` by running the command `pip3 freeze`:
astroid==2.1.0
cassandra-driver==3.16.0
isort==4.3.4
lazy-object-proxy==1.3.1
mccabe==0.6.1
pylint==2.2.2
six==1.12.0
wrapt==1.10.11
Seeing no `cassandra`, I tried to import the visible module: `cassandra-driver` and then I ended up with the error:
File "<stdin>", line 1
import cassandra-driver
^
SyntaxError: invalid syntax
Also, when I do correct the hyphen issue with this:
`__import__("cassandra-driver")`, I get the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cassandra-driver'
My `which python3` is: `/usr/local/bin/python3` and my `which pip3` is: `/usr/local/bin/pip3`
My OS is MacOS
How to install `cassandra`?
Note: I am following [this][1] documentation.
[1]:
`sudo pip3 install cassandra-driver`, I am getting the error `ModuleNotFoundError: No module named 'cassandra'` when I try to import the module by running the line `cassandra`.
I then tried to see what all modules are installed in `pip3` by running the command `pip3 freeze`:
astroid==2.1.0
cassandra-driver==3.16.0
isort==4.3.4
lazy-object-proxy==1.3.1
mccabe==0.6.1
pylint==2.2.2
six==1.12.0
wrapt==1.10.11
Seeing no `cassandra`, I tried to import the visible module: `cassandra-driver` and then I ended up with the error:
File "<stdin>", line 1
import cassandra-driver
^
SyntaxError: invalid syntax
Also, when I do correct the hyphen issue with this:
`__import__("cassandra-driver")`, I get the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cassandra-driver'
My `which python3` is: `/usr/local/bin/python3` and my `which pip3` is: `/usr/local/bin/pip3`
My OS is MacOS
How to install `cassandra`?
Note: I am following [this][1] documentation.
[1]:
[To see links please register here]