question

christbenhur avatar image
christbenhur asked christbenhur commented

Unable to upgrade Python driver in DS201 VM

Hi,

I am unable to upgrade Cassandra driver as provided in the DS201-Exercise 5 Solution. I am using the VM DS201-VM-6.0 provided in the course.

Please help me.

The following is the error.

ubuntu@ds201-node1:~$ python
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from cassandra.cluster import Cluster
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cassandra.cluster
>>> cluster = Cluster(protocol_version = 3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'Cluster' is not defined
>>> session = cluster.connect('killrvideo')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'cluster' is not defined
>>> exit()
ubuntu@ds201-node1:~$ sudo pip install --upgrade cassandra-driver
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting cassandra-driver
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fbd0093c5d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/cassandra-driver/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fbd0093c710>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/cassandra-driver/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fbd0093c850>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/cassandra-driver/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fbd0093c990>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/cassandra-driver/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fbd0093cad0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/cassandra-driver/
Could not find a version that satisfies the requirement cassandra-driver (from versions: )
No matching distribution found for cassandra-driver
academyds201
10 |1000

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

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered christbenhur commented

It looks like your VM doesn't have internet connectivity.

You will need to reconfigure VirtualBox's network for your VM as described in question #8043. Cheers!

3 comments Share
10 |1000

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

christbenhur avatar image christbenhur commented ·

Thank you Erick. Solution provided in the #8043 worked. But it assigned the IP address 10.0.2.15. The host system is having ip range 192.168.1.202. Is there any way to assign the ip address to the guest vm in the range that the host is having?

0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ christbenhur commented ·

The 10.0.x.x IP is a private network which tells me you've got the VM configured with NAT. Reconfigure it to "bridged" if you want the VM accessible on your LAN. Just do an internet search if this doesn't make sense. Cheers!

0 Likes 0 ·
christbenhur avatar image christbenhur Erick Ramirez ♦♦ commented ·

Thanks Erick.

0 Likes 0 ·