Ubidots Community

Cannot import name 'ApiClient' from 'ubidots'

i’m using a raspberrypi 4 with grovepi+
followed the installation tasks for ubidots

  1. sudo pip install ubidots==1.6.6
  2. sudo pip3 install
    but always get error : ImportError: cannot import name ‘ApiClient’ from ‘ubidots’ (/home/pi/ubidots.py)

my python code is

from ubidots import ApiClient
api = ApiClient(token=‘BBFF-wMUFLp3y0XGpKKIOPvctdWEuHhav8L’)
control_variable = api.get_variable(“5e4c0b551d847236777a685d”)
status = control_variable.get_values(1)

print (status[0][‘value’])
if status[0][‘value’]:
print (“Switch is ON”)
print( “Switch is OFF”)