I have a Raspberry Pi 4 and I have installed azure-iot-hub
python package using below commands:
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev python3-dev uuid-dev cmake python3-pip
pip3 install uamqp --no-binary=uamqp uamqp
pip3 install azure-iot-hub
It is installed fine in my venv. If I do pip show azure-iot-hub
, I get below:
Name: azure-iot-hub
Version: 2.6.1
Summary: Microsoft Azure IoTHub Service Library
Home-page: https://github.com/Azure/azure-iot-hub-python/
Author: Microsoft Corporation
Author-email: [email protected]
License: MIT License
Location: /home/developer/virtual-env/lib/python3.11/site-packages
Requires: azure-core, msrest, uamqp
Required-by:
So everything looks fine. Now when I import it like below:
from azure.iot.hub import IoTHubRegistryManager
I get error:
>>> from azure.iot.hub import IoTHubRegistryManager
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'azure.iot.hub'
>>>
I have checked this question but the answers doesn’t help much. Can any one please help me in this. Thanks