No module named “losantmqtt” python error

raspberry-pi
python
#1

When I try to connect my raspberry pi 3 to losant platform even the steps. It didn’t connect!!

0 Likes

#2

Hello!

This could be occurring if you have not installed the Losant Python library. The documentation for setting up the Raspberry Pi has the terminal command:

$ sudo pip install losant-mqtt gpiozero

If you have not run this command, it can result in the error you are seeing.

If this is not the case, let me know!
Julia

0 Likes

#3

I already did that and received that’s done!!

0 Likes

#4

Hi,

Thanks for your patience! Unfortunately, it can be hard to debug on our end in these cases since there are multiple moving parts. It could be there is a problem with your python environment, but it could also be where you installed the package. Here is a similar problem on Stack Overflow that may provide some help.

Thanks,
Julia

1 Like

#5

Thanks^^ I will try to see about that and solve it if I can.
But the problem too even that I did all the steps in the documentation, my pi can’t connect to the platform!!

Is that cause of the The last Problem?

0 Likes

#6

I would check general connectivity, and even a simple Non losant test to another broker) for instance run mosquitto on the pi, and check you can connect there.

In addition what error are you getting when you try to connect to losant ?

2 Likes

#7

I hadn’t test mosquitto broker or client before or have enough information about it!!

1 Like

#8

There is no error in losant platform and the pi cant connect it, even the pi get the error : no module named’losantmqtt’ even I enter all the commands!!

0 Likes

#9

Hello @gh_amel,

For further debugging, I would recommend running a command to see which losant-mqtt version you have installed. The output of the terminal can provide some helpful information for debugging, and we will be able to see if the package was correctly installed, here is my terminal output:

Thanks,
Julia

0 Likes

#10


We must work with python3!!
I need more commands to show details plz

0 Likes

#11

I Solved the problem thanks so much for your help ^^
That was really nice

1 Like