Python code errors, its showing command not found 0n running below code

I ran the code and its showing command not found (I am running it on terminal)

from boltiot import Bolt
api_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
device_id  = "BOLTXXXXXX"
mybolt = Bolt(api_key, device_id)
response = mybolt.isOnline()
print (response)

make sure that you had write your api key, device id correctly, one single mistake in api key and device id can lead to error. I also found this type of error when i was doing this project but after correction of api key and device id this error was removed. Try this … BEST OF LUCK…

there are hyphens in the keys do I need to remove it or paste as it is

there is no need of removing that hyphen in the key but you have about the hyphen in the key then do one thing :- generate the new api key and then proceed hopefully this might work…

this is the code, pls tell me what is the issue

Hi @vikramjkataria,

Can you share the screenshot of the error? Your code seems fine to me and i think there could be some in boltiot packages installation.

1 Like

try this
sudo pip install boltiot

sudo apt-get install python3-pip

I did all these previously but still I am stuck

Hi @vikramjkataria,

Can you send me the screenshot of below commands

sudo pip3 install boltiot 
sudo pip3 freeze

Do let me know in case you need any other information.