Cassandra-driver for python3

748 Views Asked by At

I am trying to work on cassandra using dockers and also I need Python to work with it. I tried installing cassandra-driver for Python using pip command. But the driver got installed for python2.7 but I might need to install driver for python3. When I use the command: sudo pip3 install cassandra-driver I got an error. But sudo pip install cassandra-driver didn't give any error and it got installed.

sudo pip3 install cassandra-driver
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'

I tried to look at the pip3 file to make changes but not sure which one to change. It looks fine.

#!/home/XXX/PycharmProjects/XX/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('pip==10.0.1', 'console_scripts', 'pip3')()
    )
0

There are 0 best solutions below