Error building a python script in IBM Cloud for Data refinery

153 Views Asked by At

I'm trying to execute this code in a notebook:

from cloudant.client import Cloudant
client = Cloudant('yyyyyy', 'xxxxxxxx',     url='https://yyyyyy.cloudant.com',
connect=True,
auto_renew=True)
my_database = client['logs']
my_document = my_database['325f5d5699c58e3c30bd6a125901c914']
print(my_document)

But I'm getting this error:

ImportError: No module named 'cloudant'

How do I install the modulo on IBM cloud?

1

There are 1 best solutions below

0
On

You need to install the Cloudant module in your notebook. In a new cell, type:

!pip install cloudant

Note the exclamation mark.

enter image description here