import paho.mqtt.client as mqtt in pi code example Example: install paho mqtt client raspberry pi pip3 install paho-mqtt