Reputation: 1095
I am trying to set up Cassandra with Datomic and when I run the command cqlsh -f ~/datomic/bin/cql/cassandra-user.cql -u uname -p pword
I get an error that says
Python: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Module load path: [
'/usr/local/Cellar/cassandra/2.1.2/bin',
'/Library/Python/2.7/site-packages/cql-1.4.0-py2.7.egg',
'/Library/Python/2.7/site-packages/thrift-0.9.2-py2.7-macosx-10.10-intel.egg',
'/Library/Python/2.7/site-packages/ccm-2.0.2-py2.7.egg',
'/Library/Python/2.7/site-packages/tailer-0.3-py2.7.egg',
'/Library/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/psutil-2.2.0-py2.7-macosx-10.10-intel.egg',
'/Library/Python/2.7/site-packages/pip-6.0.6-py2.7.egg',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
'/Library/Python/2.7/site-packages']
Error: No module named cassandra
I have installed the driver using pip install cassandra-driver
attempted putting the path that the driver is located in on my PYTHONPATH, using export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
. I have even copied the driver into one of the directories that are already listed on my path. No luck. Could somebody help me to get past this hurdle?
Cassandra was installed with homebrew here /usr/local/Cellar/cassandra/2.1.2/
Datomic is here
~/datomic
cassandra-driver is here
/usr/local/lib/python2.7/site-packages
Upvotes: 2
Views: 5016
Reputation: 5249
It looks like you're trying to use the mac system python distribution, are you? While theres nothing wrong with that, its recommended to leave the system distribution alone and install a separate python using brew install python
. Afterwards try installing cqlsh using pip install cql
while making sure to use the brew pip version (check using which pip
-> should point to /usr/local).
Upvotes: 2